diff --git a/src/util.rs b/src/util.rs index 9e62d20..d6bdd39 100644 --- a/src/util.rs +++ b/src/util.rs @@ -74,7 +74,5 @@ pub fn deserialize_git_like_url<'de, D: Deserializer<'de>>( } pub fn hash>(struc: S) -> String { - let mut hasher = Sha256::new(); - hasher.update(struc.as_ref()); - format!("{:x}", hasher.finalize()) + format!("{:x}", Sha256::digest(struc.as_ref())) }