Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
oid: Nicer panic message
Lorenz Leutgeb committed 2 days ago
commit deabe6d2ceac7547343f7bbad7ceea86e19c11c0
parent 60f42bf
1 file changed +2 -2
modified 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"),
            }
        }
    }