diff options
Diffstat (limited to 'library/std/src/sys/unix')
| -rw-r--r-- | library/std/src/sys/unix/net.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/unix/os_str/tests.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/unix/process/process_fuchsia.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/unix/process/process_unix.rs | 10 | ||||
| -rw-r--r-- | library/std/src/sys/unix/process/process_vxworks.rs | 4 | ||||
| -rw-r--r-- | library/std/src/sys/unix/rand.rs | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/library/std/src/sys/unix/net.rs b/library/std/src/sys/unix/net.rs index 61c15ecd85d..e6fd9a0c827 100644 --- a/library/std/src/sys/unix/net.rs +++ b/library/std/src/sys/unix/net.rs @@ -54,7 +54,7 @@ pub fn cvt_gai(err: c_int) -> io::Result<()> { Err(io::Error::new( io::ErrorKind::Uncategorized, - &format!("failed to lookup address information: {}", detail)[..], + &format!("failed to lookup address information: {detail}")[..], )) } diff --git a/library/std/src/sys/unix/os_str/tests.rs b/library/std/src/sys/unix/os_str/tests.rs index 37967378155..213277f01f2 100644 --- a/library/std/src/sys/unix/os_str/tests.rs +++ b/library/std/src/sys/unix/os_str/tests.rs @@ -4,7 +4,7 @@ use super::*; fn slice_debug_output() { let input = Slice::from_u8_slice(b"\xF0hello,\tworld"); let expected = r#""\xF0hello,\tworld""#; - let output = format!("{:?}", input); + let output = format!("{input:?}"); assert_eq!(output, expected); } diff --git a/library/std/src/sys/unix/process/process_fuchsia.rs b/library/std/src/sys/unix/process/process_fuchsia.rs index 09bfd9680f5..e3347ab12a7 100644 --- a/library/std/src/sys/unix/process/process_fuchsia.rs +++ b/library/std/src/sys/unix/process/process_fuchsia.rs @@ -211,7 +211,7 @@ impl Process { return Ok(None); } _ => { - panic!("Failed to wait on process handle: {}", status); + panic!("Failed to wait on process handle: {status}"); } } zx_cvt(zx_object_get_info( diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs index 07a0339c066..9c477e5addc 100644 --- a/library/std/src/sys/unix/process/process_unix.rs +++ b/library/std/src/sys/unix/process/process_unix.rs @@ -120,7 +120,7 @@ impl Command { Err(ref e) if e.kind() == ErrorKind::Interrupted => {} Err(e) => { assert!(p.wait().is_ok(), "wait() should either return Ok or panic"); - panic!("the CLOEXEC pipe failed: {:?}", e) + panic!("the CLOEXEC pipe failed: {e:?}") } Ok(..) => { // pipe I/O up to PIPE_BUF bytes should be atomic @@ -682,15 +682,15 @@ impl From<c_int> for ExitStatus { impl fmt::Display for ExitStatus { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { if let Some(code) = self.code() { - write!(f, "exit status: {}", code) + write!(f, "exit status: {code}") } else if let Some(signal) = self.signal() { if self.core_dumped() { - write!(f, "signal: {} (core dumped)", signal) + write!(f, "signal: {signal} (core dumped)") } else { - write!(f, "signal: {}", signal) + write!(f, "signal: {signal}") } } else if let Some(signal) = self.stopped_signal() { - write!(f, "stopped (not terminated) by signal: {}", signal) + write!(f, "stopped (not terminated) by signal: {signal}") } else if self.continued() { write!(f, "continued (WIFCONTINUED)") } else { diff --git a/library/std/src/sys/unix/process/process_vxworks.rs b/library/std/src/sys/unix/process/process_vxworks.rs index 56ed6cfeb6a..016bc20ec0a 100644 --- a/library/std/src/sys/unix/process/process_vxworks.rs +++ b/library/std/src/sys/unix/process/process_vxworks.rs @@ -239,10 +239,10 @@ impl From<c_int> for ExitStatus { impl fmt::Display for ExitStatus { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { if let Some(code) = self.code() { - write!(f, "exit code: {}", code) + write!(f, "exit code: {code}") } else { let signal = self.signal().unwrap(); - write!(f, "signal: {}", signal) + write!(f, "signal: {signal}") } } } diff --git a/library/std/src/sys/unix/rand.rs b/library/std/src/sys/unix/rand.rs index 7a3f6b0d95a..17e8efbe097 100644 --- a/library/std/src/sys/unix/rand.rs +++ b/library/std/src/sys/unix/rand.rs @@ -82,7 +82,7 @@ mod imp { } else if err == libc::EAGAIN { return false; } else { - panic!("unexpected getrandom error: {}", err); + panic!("unexpected getrandom error: {err}"); } } else { read += result as usize; |
