oid: Nicer panic message

The panic message that `unimplemented!` generates is more appropriate.
This commit is contained in:
Lorenz Leutgeb 2026-04-23 22:42:34 +02:00 committed by Lorenz Leutgeb
parent 60f42bff53
commit deabe6d2ce
1 changed files with 2 additions and 2 deletions

View File

@ -371,7 +371,7 @@ mod gix {
fn from(other: Other) -> Self { fn from(other: Other) -> Self {
match other { match other {
Other::Sha1(digest) => Self::Sha1(digest), 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 { fn eq(&self, other: &Other) -> bool {
match (self, other) { match (self, other) {
(Oid::Sha1(a), Other::Sha1(b)) => a == b, (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"),
} }
} }
} }