From deabe6d2ceac7547343f7bbad7ceea86e19c11c0 Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Thu, 23 Apr 2026 22:42:34 +0200 Subject: [PATCH] oid: Nicer panic message The panic message that `unimplemented!` generates is more appropriate. --- crates/radicle-oid/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/radicle-oid/src/lib.rs b/crates/radicle-oid/src/lib.rs index e4f66d9f..bd42f10d 100644 --- a/crates/radicle-oid/src/lib.rs +++ b/crates/radicle-oid/src/lib.rs @@ -371,7 +371,7 @@ mod gix { fn from(other: Other) -> Self { match other { Other::Sha1(digest) => Self::Sha1(digest), - _ => panic!("unexpected SHA variant was returned for `gix_hash::ObjectId`"), + _ => unimplemented!("conversion from {other:?} into radicle_oid::Oid"), } } } @@ -388,7 +388,7 @@ mod gix { fn eq(&self, other: &Other) -> bool { match (self, other) { (Oid::Sha1(a), Other::Sha1(b)) => a == b, - _ => panic!("unexpected SHA variant was returned for `gix_hash::ObjectId`"), + _ => unimplemented!("conversion from {other:?} into radicle_oid::Oid"), } } }