Skip to content

Commit cc085e9

Browse files
committed
Replace assert with unreachable
1 parent e61148f commit cc085e9

File tree

1 file changed

+3
-3
lines changed
  • library/std/src/sys/unix/ext/net

1 file changed

+3
-3
lines changed

library/std/src/sys/unix/ext/net/tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ fn test_send_vectored_fds_unix_stream() {
487487
libc::close(fd_vec[0]);
488488
}
489489
} else {
490-
assert!(false);
490+
unreachable!("must be ScmRights");
491491
}
492492
}
493493

@@ -553,7 +553,7 @@ fn test_send_vectored_with_ancillary_to_unix_datagram() {
553553
assert_eq!(cred1.get_uid(), cred_vec[0].get_uid());
554554
assert_eq!(cred1.get_gid(), cred_vec[0].get_gid());
555555
} else {
556-
assert!(false);
556+
unreachable!("must be ScmCredentials");
557557
}
558558
}
559559

@@ -598,6 +598,6 @@ fn test_send_vectored_with_ancillary_unix_datagram() {
598598
libc::close(fd_vec[0]);
599599
}
600600
} else {
601-
assert!(false);
601+
unreachable!("must be ScmRights");
602602
}
603603
}

0 commit comments

Comments
 (0)