summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sys/socket/addr.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sys/socket/addr.rs b/src/sys/socket/addr.rs
index 2b3e4919..8b23b10c 100644
--- a/src/sys/socket/addr.rs
+++ b/src/sys/socket/addr.rs
@@ -3197,8 +3197,7 @@ mod tests {
#[cfg(any(target_os = "android", target_os = "linux"))]
#[test]
fn from_sockaddr_un_abstract_unnamed() {
- let empty = String::new();
- let ua = UnixAddr::new_abstract(empty.as_bytes()).unwrap();
+ let ua = UnixAddr::new_unnamed();
let ptr = ua.as_ptr() as *const libc::sockaddr;
let ss = unsafe {
SockaddrStorage::from_raw(ptr, Some(ua.len()))