diff options
| author | elszben <notgonna@tellyou> | 2014-12-17 07:21:29 +0100 |
|---|---|---|
| committer | elszben <notgonna@tellyou> | 2014-12-17 07:21:29 +0100 |
| commit | c910252769370a1bc039ec25ed918d81669d28ad (patch) | |
| tree | 45e095c0dc9912dce658be5c421ba7eb2f21246f /src/libstd/io | |
| parent | c0e8dc6dce5d847b7bf53b306d6d842e3a223c28 (diff) | |
| download | rust-c910252769370a1bc039ec25ed918d81669d28ad.tar.gz rust-c910252769370a1bc039ec25ed918d81669d28ad.zip | |
Replaced wrapper functions with no_run and as_str().unwrap() with display()
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/tempfile.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libstd/io/tempfile.rs b/src/libstd/io/tempfile.rs index 334ee9e1e1b..c2b4d5a1fa9 100644 --- a/src/libstd/io/tempfile.rs +++ b/src/libstd/io/tempfile.rs @@ -26,9 +26,7 @@ use sync::atomic; /// /// # Examples /// -/// ``` -/// # fn main() {} -/// # fn foo () { +/// ```no_run /// use std::io::TempDir; /// /// { @@ -41,7 +39,7 @@ use sync::atomic; /// // get the path of the temporary directory without affecting the wrapper /// let tmppath = tmpdir.path(); /// -/// println!("The path of temporary directory is {}", tmppath.as_str().unwrap()); +/// println!("The path of temporary directory is {}", tmppath.display()); /// /// // the temporary directory is automatically removed when tmpdir goes /// // out of scope at the end of the block @@ -56,7 +54,7 @@ use sync::atomic; /// // get the path of the temporary directory and disable automatic deletion in the wrapper /// let tmppath = tmpdir.into_inner(); /// -/// println!("The path of the not-so-temporary directory is {}", tmppath.as_str().unwrap()); +/// println!("The path of the not-so-temporary directory is {}", tmppath.display()); /// /// // the temporary directory is not removed here /// // because the directory is detached from the wrapper @@ -74,7 +72,6 @@ use sync::atomic; /// Err(e) => panic!("couldn't remove temporary directory: {}", e) /// }; /// } -/// # } /// ``` pub struct TempDir { path: Option<Path>, |
