From 1161aeb2b423da744e687315648a49cc4774220b Mon Sep 17 00:00:00 2001 From: Ali Raheem Date: Mon, 9 Sep 2019 20:38:21 +0100 Subject: [PATCH] Replace println statements with explanatory comments --- src/libstd/fs.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 689c50c6b80fa..246587b4233cd 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -2002,20 +2002,17 @@ pub fn remove_dir_all>(path: P) -> io::Result<()> { /// use std::{fs, io}; /// /// fn main() -> io::Result<()> { -/// // The order in which `read_dir` returns entries is not guaranteed. If reproducible -/// // ordering is required the entries should be explicitly sorted. /// let mut entries = fs::read_dir(".")? /// .map(|res| res.map(|e| e.path())) /// .collect::, io::Error>>()?; /// -/// // println!( -/// // "Entries before sorting (may or may not be sorted already): {:?}", -/// // entries -/// // ); +/// // The order in which `read_dir` returns entries is not guaranteed. If reproducible +/// // ordering is required the entries should be explicitly sorted. /// /// entries.sort(); /// -/// // println!("Entries after sorting: {:?}", entries); +/// // The entries have now been sorted by their path. +/// /// Ok(()) /// } /// ```