oid: Nicer panic message
The panic message that `unimplemented!` generates is more appropriate.
This commit is contained in:
parent
60f42bff53
commit
deabe6d2ce
|
|
@ -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"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue