From 04e45c877fc43a6b1624adfddeed5700becfa543 Mon Sep 17 00:00:00 2001 From: oberien Date: Sun, 26 May 2019 02:55:21 +0200 Subject: [PATCH] Print file mode of PermissionExt in octal in Examples --- src/libstd/sys/redox/ext/fs.rs | 2 +- src/libstd/sys/unix/ext/fs.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstd/sys/redox/ext/fs.rs b/src/libstd/sys/redox/ext/fs.rs index 53b9dd68f734f..4ddc1f09a319b 100644 --- a/src/libstd/sys/redox/ext/fs.rs +++ b/src/libstd/sys/redox/ext/fs.rs @@ -27,7 +27,7 @@ pub trait PermissionsExt { /// let metadata = f.metadata()?; /// let permissions = metadata.permissions(); /// - /// println!("permissions: {}", permissions.mode()); + /// println!("permissions: {:o}", permissions.mode()); /// Ok(()) /// } /// ``` diff --git a/src/libstd/sys/unix/ext/fs.rs b/src/libstd/sys/unix/ext/fs.rs index d9baac993c42c..c033c60cbe9e1 100644 --- a/src/libstd/sys/unix/ext/fs.rs +++ b/src/libstd/sys/unix/ext/fs.rs @@ -238,7 +238,7 @@ pub trait PermissionsExt { /// let metadata = f.metadata()?; /// let permissions = metadata.permissions(); /// - /// println!("permissions: {}", permissions.mode()); + /// println!("permissions: {:o}", permissions.mode()); /// Ok(()) } /// ``` #[stable(feature = "fs_ext", since = "1.1.0")]