about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2016-04-06 12:12:09 -0700
committerSteve Klabnik <steve@steveklabnik.com>2016-04-06 12:12:09 -0700
commit3531a1a0da9262f2e4795353e97c3ef64fa979fd (patch)
tree844468d9fa6c369b5f63a73b08cf39c5973dc58b /src/libcore
parent510b3803174fc3effff6a6ffe3dcc93bdfaaa534 (diff)
parent922e666820fef2f5d9bd7fa450b4a45d85fdd84a (diff)
downloadrust-3531a1a0da9262f2e4795353e97c3ef64fa979fd.tar.gz
rust-3531a1a0da9262f2e4795353e97c3ef64fa979fd.zip
Rollup merge of #32761 - tshepang:assert, r=steveklabnik
avoid "==" in assert! when one of the values is a bool

Is suspect this is something of an idiom
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/ptr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 37e9d18095f..42aef3ab3dd 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -220,7 +220,7 @@ impl<T: ?Sized> *const T {
     /// ```
     /// let s: &str = "Follow the rabbit";
     /// let ptr: *const u8 = s.as_ptr();
-    /// assert!(ptr.is_null() == false);
+    /// assert!(!ptr.is_null());
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]
@@ -306,7 +306,7 @@ impl<T: ?Sized> *mut T {
     /// ```
     /// let mut s = [1, 2, 3];
     /// let ptr: *mut u32 = s.as_mut_ptr();
-    /// assert!(ptr.is_null() == false);
+    /// assert!(!ptr.is_null());
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]