From 2afa4cc958d3d65957083f3ae0bded237cce9a87 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Sat, 27 Mar 2021 13:29:23 +0100 Subject: Use DebugStruct::finish_non_exhaustive() in std. --- library/std/src/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'library/std/src/fs.rs') diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index ccbc69a975c..8da6ced03a8 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -1154,7 +1154,7 @@ impl fmt::Debug for Metadata { .field("modified", &self.modified()) .field("accessed", &self.accessed()) .field("created", &self.created()) - .finish() + .finish_non_exhaustive() } } -- cgit 1.4.1-3-g733a5 From 5495ce087438ec85ebd252cf3339c30cedad95d8 Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Wed, 25 Nov 2020 11:22:19 +0800 Subject: Use detailed and shorter fs error explaination Includes suggestion from the8472 https://github.com/rust-lang/rust/issues/79390#issuecomment-733263336 More detail error explanation in fs doc --- library/std/src/fs.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'library/std/src/fs.rs') diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index e2d4f2e6a56..e2140ce7e60 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -1676,9 +1676,9 @@ pub fn rename, Q: AsRef>(from: P, to: Q) -> io::Result<()> /// This function will return an error in the following situations, but is not /// limited to just these cases: /// -/// * The `from` path is not a file. -/// * The `from` file does not exist. -/// * The current process does not have the permission rights to access +/// * `from` is neither a regular file nor a symlink to a regular file. +/// * `from` does not exist. +/// * The current process does not have the permission rights to read /// `from` or write `to`. /// /// # Examples -- cgit 1.4.1-3-g733a5