summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kreutz <mail@skreutz.com>2023-01-26 17:56:43 +0100
committerStefan Kreutz <mail@skreutz.com>2023-01-26 17:57:24 +0100
commita29cb44434224ea02e4af7537f26a02ec2ce65b8 (patch)
tree6ebe2ab253dc1e9a23ff2012da13377e84e10bbc
parent3b7539c82a9510771b0ef377679afe739555af6f (diff)
downloadwpa-psk-a29cb44434224ea02e4af7537f26a02ec2ce65b8.tar
Inline format macro arguments
Fixes new warning clippy::uninlined-format-args.
-rw-r--r--wpa-psk-cli/src/bin/wpa-psk.rs2
-rw-r--r--wpa-psk/src/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/wpa-psk-cli/src/bin/wpa-psk.rs b/wpa-psk-cli/src/bin/wpa-psk.rs
index 22404eb..ddcec0d 100644
--- a/wpa-psk-cli/src/bin/wpa-psk.rs
+++ b/wpa-psk-cli/src/bin/wpa-psk.rs
@@ -27,7 +27,7 @@ fn main() {
exit(match run() {
Ok(_) => 0,
Err(err) => {
- eprintln!("{}", err);
+ eprintln!("{err}");
1
}
})
diff --git a/wpa-psk/src/lib.rs b/wpa-psk/src/lib.rs
index 5acf8e5..db114ab 100644
--- a/wpa-psk/src/lib.rs
+++ b/wpa-psk/src/lib.rs
@@ -156,7 +156,7 @@ pub fn wpa_psk_unchecked(ssid: &[u8], passphrase: &[u8]) -> [u8; 32] {
/// Returns the hexdecimal representation of the given bytes.
pub fn bytes_to_hex(bytes: &[u8]) -> String {
- bytes.iter().map(|b| format!("{:02x}", b)).collect()
+ bytes.iter().map(|b| format!("{b:02x}")).collect()
}
#[cfg(test)]
Generated by cgit. See skreutz.com for my tech blog and contact information.