mirror of
https://github.com/pesde-pkg/pesde.git
synced 2024-12-12 11:00:36 +00:00
refactor: use digest method in hash util
This commit is contained in:
parent
2a136f11db
commit
f631c1deb9
1 changed files with 1 additions and 3 deletions
|
@ -74,7 +74,5 @@ pub fn deserialize_git_like_url<'de, D: Deserializer<'de>>(
|
|||
}
|
||||
|
||||
pub fn hash<S: AsRef<[u8]>>(struc: S) -> String {
|
||||
let mut hasher = Sha256::new();
|
||||
hasher.update(struc.as_ref());
|
||||
format!("{:x}", hasher.finalize())
|
||||
format!("{:x}", Sha256::digest(struc.as_ref()))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue