Skip to content

Commit 8522191

Browse files
bors[bot]asomers
andauthored
Merge #1880
1880: Use the new UnixAddr::new_unnamed in the unit tests r=rtzoeller a=asomers Use it in the from_sockaddr_un_abstract_unnamed test. That test and this method were introduced by PRs #1871 and #1857, which crossed each other. Co-authored-by: Alan Somers <[email protected]>
2 parents 79f04fb + 59c21f7 commit 8522191

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/sys/socket/addr.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3197,8 +3197,7 @@ mod tests {
31973197
#[cfg(any(target_os = "android", target_os = "linux"))]
31983198
#[test]
31993199
fn from_sockaddr_un_abstract_unnamed() {
3200-
let empty = String::new();
3201-
let ua = UnixAddr::new_abstract(empty.as_bytes()).unwrap();
3200+
let ua = UnixAddr::new_unnamed();
32023201
let ptr = ua.as_ptr() as *const libc::sockaddr;
32033202
let ss = unsafe {
32043203
SockaddrStorage::from_raw(ptr, Some(ua.len()))

0 commit comments

Comments
 (0)