aboutsummaryrefslogtreecommitdiffstats
path: root/src/cipherstring.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2023-02-18 15:38:43 -0500
committerJesse Luehrs <doy@tozt.net>2023-02-18 15:49:17 -0500
commit1d68b717e8ae12dfdf8af9c451dbf0d6a8cc6d71 (patch)
tree9416fd8d1bc125aa6f217d6cbc6340e27655bb99 /src/cipherstring.rs
parentc6a948a5cfa2783907c084cc8d1034c33db319e6 (diff)
downloadrbw-1d68b717e8ae12dfdf8af9c451dbf0d6a8cc6d71.tar.gz
rbw-1d68b717e8ae12dfdf8af9c451dbf0d6a8cc6d71.zip
clippy
Diffstat (limited to 'src/cipherstring.rs')
-rw-r--r--src/cipherstring.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cipherstring.rs b/src/cipherstring.rs
index 39254c7..8e40ace 100644
--- a/src/cipherstring.rs
+++ b/src/cipherstring.rs
@@ -247,18 +247,18 @@ impl std::fmt::Display for CipherString {
ciphertext,
mac,
} => {
- let iv = base64::encode(&iv);
- let ciphertext = base64::encode(&ciphertext);
+ let iv = base64::encode(iv);
+ let ciphertext = base64::encode(ciphertext);
if let Some(mac) = &mac {
- let mac = base64::encode(&mac);
- write!(f, "2.{}|{}|{}", iv, ciphertext, mac)
+ let mac = base64::encode(mac);
+ write!(f, "2.{iv}|{ciphertext}|{mac}")
} else {
- write!(f, "2.{}|{}", iv, ciphertext)
+ write!(f, "2.{iv}|{ciphertext}")
}
}
Self::Asymmetric { ciphertext } => {
- let ciphertext = base64::encode(&ciphertext);
- write!(f, "4.{}", ciphertext)
+ let ciphertext = base64::encode(ciphertext);
+ write!(f, "4.{ciphertext}")
}
}
}