summaryrefslogtreecommitdiff
path: root/test/sys
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-12-04 22:04:49 +0000
committerGitHub <noreply@github.com>2022-12-04 22:04:49 +0000
commite756c967e837a0b3c8bb785b8bb56dde1f6c05eb (patch)
tree022a92052d492ef559bcab576dbd1b1cfa3305a9 /test/sys
parent3286c4df4871505c46d41f1aec10e984aa07e960 (diff)
parentbc2b023e2473531448e1e24502da746dca9ff2ac (diff)
downloadnix-e756c967e837a0b3c8bb785b8bb56dde1f6c05eb.zip
Merge #1862
1862: Bump MSRV to 1.63 for I/O safety r=asomers a=SUPERCILEX Prep for https://github.com/nix-rust/nix/issues/1750 Co-authored-by: Alex Saveau <saveau.alexandre@gmail.com>
Diffstat (limited to 'test/sys')
-rw-r--r--test/sys/test_aio.rs2
-rw-r--r--test/sys/test_signal.rs8
-rw-r--r--test/sys/test_socket.rs12
3 files changed, 10 insertions, 12 deletions
diff --git a/test/sys/test_aio.rs b/test/sys/test_aio.rs
index 84086f80..fdabaca6 100644
--- a/test/sys/test_aio.rs
+++ b/test/sys/test_aio.rs
@@ -610,7 +610,7 @@ fn test_aio_suspend() {
let r = aio_suspend(&cbbuf[..], Some(timeout));
match r {
Err(Errno::EINTR) => continue,
- Err(e) => panic!("aio_suspend returned {:?}", e),
+ Err(e) => panic!("aio_suspend returned {e:?}"),
Ok(_) => (),
};
}
diff --git a/test/sys/test_signal.rs b/test/sys/test_signal.rs
index 3ad14f40..721cb9c9 100644
--- a/test/sys/test_signal.rs
+++ b/test/sys/test_signal.rs
@@ -54,9 +54,8 @@ fn test_sigprocmask() {
// test don't make sense.
assert!(
!old_signal_set.contains(SIGNAL),
- "the {:?} signal is already blocked, please change to a \
- different one",
- SIGNAL
+ "the {SIGNAL:?} signal is already blocked, please change to a \
+ different one"
);
// Now block the signal.
@@ -71,8 +70,7 @@ fn test_sigprocmask() {
.expect("expect to be able to retrieve old signals");
assert!(
old_signal_set.contains(SIGNAL),
- "expected the {:?} to be blocked",
- SIGNAL
+ "expected the {SIGNAL:?} to be blocked"
);
// Reset the signal.
diff --git a/test/sys/test_socket.rs b/test/sys/test_socket.rs
index 1413eb6b..2ab6c54f 100644
--- a/test/sys/test_socket.rs
+++ b/test/sys/test_socket.rs
@@ -626,7 +626,7 @@ mod recvfrom {
println!("IPv6 not available, skipping test.");
return;
}
- Err(e) => panic!("bind: {}", e),
+ Err(e) => panic!("bind: {e}"),
Ok(()) => (),
}
let ssock = socket(
@@ -1272,7 +1272,7 @@ fn test_scm_credentials() {
ControlMessageOwned::ScmCredentials(cred) => cred,
#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
ControlMessageOwned::ScmCreds(cred) => cred,
- other => panic!("unexpected cmsg {:?}", other),
+ other => panic!("unexpected cmsg {other:?}"),
};
assert!(received_cred.is_none());
assert_eq!(cred.pid(), getpid().as_raw());
@@ -1550,7 +1550,7 @@ fn loopback_address(
Err(e) => {
let stdioerr = io::stderr();
let mut handle = stdioerr.lock();
- writeln!(handle, "getifaddrs: {:?}", e).unwrap();
+ writeln!(handle, "getifaddrs: {e:?}").unwrap();
return None;
}
};
@@ -2347,7 +2347,7 @@ mod linux_errqueue {
}
*ext_err
} else {
- panic!("Unexpected control message {:?}", cmsg);
+ panic!("Unexpected control message {cmsg:?}");
}
},
)
@@ -2398,7 +2398,7 @@ mod linux_errqueue {
}
*ext_err
} else {
- panic!("Unexpected control message {:?}", cmsg);
+ panic!("Unexpected control message {cmsg:?}");
}
},
)
@@ -2432,7 +2432,7 @@ mod linux_errqueue {
MsgFlags::empty(),
) {
assert_eq!(e, Errno::EADDRNOTAVAIL);
- println!("{:?} not available, skipping test.", af);
+ println!("{af:?} not available, skipping test.");
return;
}