aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index d2abe53..5dfb7b4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -24,7 +24,7 @@ use ring::digest;
// Convert a slice of bytes into a string of hex values
//
fn to_hex(data: &[u8]) -> String {
- data.into_iter()
+ data.iter()
.map(|b| format!("{:02X}", b))
.collect()
}
@@ -61,10 +61,7 @@ impl Password {
pub fn new(pw: &str) -> Password {
let (range, rest) = to_k_anon(digest::digest(&digest::SHA1, &pw.as_bytes()));
- Password {
- range: range,
- rest: rest,
- }
+ Password { range, rest, }
}
pub fn is_pwned(&self, hashes: &str) -> usize {