mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 00:00:37 +08:00
oid: Nicer panic message
The panic message that `unimplemented!` generates is more appropriate.
This commit is contained in:
committed by
Lorenz Leutgeb
parent
60f42bff53
commit
deabe6d2ce
@@ -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"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user