Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cob: move unwrap_used pragma
Fintan Halpenny committed 2 years ago
commit 8728d02c70202594858fc5e9fec308c107917203
parent 17744a03fd9e2bd76304fe52602ea9524d927006
1 file changed +2 -2
modified radicle-cob/src/trailers.rs
@@ -61,18 +61,18 @@ impl TryFrom<&OwnedTrailer> for CommitTrailer {
impl From<CommitTrailer> for Trailer<'_> {
    fn from(t: CommitTrailer) -> Self {
        match t {
+
            #[allow(clippy::unwrap_used)]
            CommitTrailer::Related(oid) => {
                Trailer {
                    // SAFETY: "Rad-Related" is a valid `Token`.
-
                    #[allow(clippy::unwrap_used)]
                    token: Token::try_from("Rad-Related").unwrap(),
                    value: oid.to_string().into(),
                }
            }
+
            #[allow(clippy::unwrap_used)]
            CommitTrailer::Resource(oid) => {
                Trailer {
                    // SAFETY: "Rad-Resource" is a valid `Token`.
-
                    #[allow(clippy::unwrap_used)]
                    token: Token::try_from("Rad-Resource").unwrap(),
                    value: oid.to_string().into(),
                }