We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 987e586 commit 764ff5dCopy full SHA for 764ff5d
test/sys/test_sockopt.rs
@@ -258,6 +258,7 @@ fn test_so_type_unknown() {
258
#[cfg_attr(qemu, ignore)]
259
fn test_tcp_congestion() {
260
use std::ffi::OsString;
261
+ use std::os::unix::ffi::OsStrExt;
262
263
let fd = socket(
264
AddressFamily::Inet,
@@ -268,7 +269,7 @@ fn test_tcp_congestion() {
268
269
.unwrap();
270
271
let val = getsockopt(&fd, sockopt::TcpCongestion).unwrap();
- let bytes = val.as_os_str().as_encoded_bytes();
272
+ let bytes = val.as_os_str().as_bytes();
273
for b in bytes.iter() {
274
assert_ne!(
275
*b, 0,
0 commit comments