Skip to content

Commit 764ff5d

Browse files
committed
fixup: fix MSRV breakage
1 parent 987e586 commit 764ff5d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/sys/test_sockopt.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ fn test_so_type_unknown() {
258258
#[cfg_attr(qemu, ignore)]
259259
fn test_tcp_congestion() {
260260
use std::ffi::OsString;
261+
use std::os::unix::ffi::OsStrExt;
261262

262263
let fd = socket(
263264
AddressFamily::Inet,
@@ -268,7 +269,7 @@ fn test_tcp_congestion() {
268269
.unwrap();
269270

270271
let val = getsockopt(&fd, sockopt::TcpCongestion).unwrap();
271-
let bytes = val.as_os_str().as_encoded_bytes();
272+
let bytes = val.as_os_str().as_bytes();
272273
for b in bytes.iter() {
273274
assert_ne!(
274275
*b, 0,

0 commit comments

Comments
 (0)