diff --git a/test/sys/test_socket.rs b/test/sys/test_socket.rs index 93aa606822..a5e022dc6e 100644 --- a/test/sys/test_socket.rs +++ b/test/sys/test_socket.rs @@ -2914,7 +2914,7 @@ mod linux_errqueue { ) .unwrap(); // The sent message / destination associated with the error is returned: - assert_eq!(msg.bytes, MESSAGE_CONTENTS.as_bytes().len()); + assert_eq!(msg.bytes, MESSAGE_CONTENTS.len()); // recvmsg(2): "The original destination address of the datagram that caused the error is // supplied via msg_name;" however, this is not literally true. E.g., an earlier version // of this test used 0.0.0.0 (::0) as the destination address, which was mutated into diff --git a/test/test_sendfile.rs b/test/test_sendfile.rs index 3ca8092fc6..40cefbb90d 100644 --- a/test/test_sendfile.rs +++ b/test/test_sendfile.rs @@ -143,7 +143,7 @@ fn test_sendfile_dragonfly() { + &trailer_strings.concat(); // Verify the message that was sent - assert_eq!(bytes_written as usize, expected_string.as_bytes().len()); + assert_eq!(bytes_written as usize, expected_string.len()); let mut read_string = String::new(); let bytes_read = rd.read_to_string(&mut read_string).unwrap();