about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIvan Tham <pickfire@riseup.net>2020-08-08 18:23:18 +0800
committerGitHub <noreply@github.com>2020-08-08 18:23:18 +0800
commitb3ae88f6bba244e8b372ed0fc20b000b145ddff0 (patch)
tree22f7b7f273de62f405755ae9904695e1e3a28984
parentd19d7e27552b8da17932384b8db53927a1f4e00e (diff)
downloadrust-b3ae88f6bba244e8b372ed0fc20b000b145ddff0.tar.gz
rust-b3ae88f6bba244e8b372ed0fc20b000b145ddff0.zip
Use assert! for Path exists example to check bool
-rw-r--r--library/std/src/path.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index 392c815ef28..26a01f69c99 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -2473,7 +2473,7 @@ impl Path {
     ///
     /// ```no_run
     /// use std::path::Path;
-    /// assert_eq!(Path::new("does_not_exist.txt").exists(), false);
+    /// assert!(!Path::new("does_not_exist.txt").exists());
     /// ```
     ///
     /// # See Also