Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
oid: Nicer panic message
Lorenz Leutgeb committed 14 days ago
commit 08106c076759a92bde544f211ff71442329e7261
parent 1243c184b81f7c708ccbdd7aae6be3a4fa80dca9
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"),
            }
        }
    }