summaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@ifm.com>2022-07-21 11:48:24 +0200
committerMatthias Beyer <matthias.beyer@ifm.com>2022-07-21 13:46:10 +0200
commitcdfa7bdaf2b8aa7d30656b3a58bec3d73737d047 (patch)
tree3328ef8c54e85d87467977e4f1aca4917c60ba46 /crates
parenta937b161b3634399fc8d1c1609e9734bc2ab93f7 (diff)
Remove call to AsRef::as_ref()
The `sha1::Sha1::digest()` function takes an `AsRef` as argument, which the object in `b64_bytes` implements, so the call is no longer necessary. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
Diffstat (limited to 'crates')
-rw-r--r--crates/common/certificate/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/common/certificate/src/lib.rs b/crates/common/certificate/src/lib.rs
index 00bdefed..f7ce03f5 100644
--- a/crates/common/certificate/src/lib.rs
+++ b/crates/common/certificate/src/lib.rs
@@ -312,7 +312,7 @@ mod tests {
// just decode the key contents
let b64_bytes =
base64::decode(&cert_cont[header_len..cert_cont.len() - footer_len]).unwrap();
- let expected_thumbprint = format!("{:x}", sha1::Sha1::digest(b64_bytes.as_ref()));
+ let expected_thumbprint = format!("{:x}", sha1::Sha1::digest(b64_bytes));
// compare the two thumbprints
assert_eq!(thumbprint, expected_thumbprint.to_uppercase());