Skip to content

Commit 17373fd

Browse files
authored
Merge pull request #235 from FenrirWolf/fix-clippy-lints
Fix clippy warnings
2 parents ef3913a + 5c83764 commit 17373fd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ctru-rs/examples/touch-screen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn main() {
3131
// from what it was on the previous frame.
3232
if touch != old_touch {
3333
// Move the cursor back to the top of the screen and print the coordinates.
34-
print!("\x1b[1;1HTouch Screen position: {:#?}", touch);
34+
print!("\x1b[1;1HTouch Screen position: {touch:#?}");
3535

3636
// Special case for when the user lifts the stylus/finger from the screen.
3737
// This is done to avoid some screen tearing.

ctru-rs/examples/wifi-info.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn main() {
3535

3636
fn print_network_info(ac: &Ac) -> Result<(), Box<dyn Error>> {
3737
let status = ac.wifi_status()?;
38-
println!("Wi-Fi status: {:?}", status);
38+
println!("Wi-Fi status: {status:?}");
3939

4040
// Some methods error out if the console isn't connected
4141
if matches!(
@@ -45,7 +45,7 @@ fn print_network_info(ac: &Ac) -> Result<(), Box<dyn Error>> {
4545
println!("Wi-Fi SSID: {}", String::from_utf8(ac.wifi_ssid()?)?);
4646
println!("Wi-Fi security: {:?}", ac.wifi_security()?);
4747
let proxied = ac.proxy_enabled()?;
48-
println!("Proxy enabled: {}", proxied);
48+
println!("Proxy enabled: {proxied}");
4949
if proxied {
5050
println!("Proxy port: {}", ac.proxy_port()?);
5151
println!(

ctru-rs/src/services/ac.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl Ac {
104104
1 => NetworkStatus::Idle,
105105
2 => NetworkStatus::LANConnected,
106106
3 => NetworkStatus::WANConnected,
107-
_ => return Err(crate::Error::Other(format!("Unknown value {}", ret))),
107+
_ => return Err(crate::Error::Other(format!("Unknown value {ret}"))),
108108
})
109109
}
110110
}
@@ -151,7 +151,7 @@ impl Ac {
151151
6 => SecurityMode::WPA_AES,
152152
7 => SecurityMode::WPA2_AES,
153153

154-
_ => return Err(crate::Error::Other(format!("Unknown value {}", ret))),
154+
_ => return Err(crate::Error::Other(format!("Unknown value {ret}"))),
155155
})
156156
}
157157
}

0 commit comments

Comments
 (0)