From cc085e917078ebd5ff4c7c784d8cb04da85143c7 Mon Sep 17 00:00:00 2001 From: LinkTed Date: Fri, 18 Sep 2020 14:08:31 +0200 Subject: Replace `assert` with `unreachable` --- library/std/src/sys/unix/ext/net/tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'library/std/src') diff --git a/library/std/src/sys/unix/ext/net/tests.rs b/library/std/src/sys/unix/ext/net/tests.rs index 16915a4cc1e..6cb2e729143 100644 --- a/library/std/src/sys/unix/ext/net/tests.rs +++ b/library/std/src/sys/unix/ext/net/tests.rs @@ -487,7 +487,7 @@ fn test_send_vectored_fds_unix_stream() { libc::close(fd_vec[0]); } } else { - assert!(false); + unreachable!("must be ScmRights"); } } @@ -553,7 +553,7 @@ fn test_send_vectored_with_ancillary_to_unix_datagram() { assert_eq!(cred1.get_uid(), cred_vec[0].get_uid()); assert_eq!(cred1.get_gid(), cred_vec[0].get_gid()); } else { - assert!(false); + unreachable!("must be ScmCredentials"); } } @@ -598,6 +598,6 @@ fn test_send_vectored_with_ancillary_unix_datagram() { libc::close(fd_vec[0]); } } else { - assert!(false); + unreachable!("must be ScmRights"); } } -- cgit 1.4.1-3-g733a5