Skip to content

Commit fb63fdc

Browse files
author
elszben
committed
---
yaml --- r: 165414 b: refs/heads/master c: c910252 h: refs/heads/master v: v3
1 parent eaf326f commit fb63fdc

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: c0e8dc6dce5d847b7bf53b306d6d842e3a223c28
2+
refs/heads/master: c910252769370a1bc039ec25ed918d81669d28ad
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 658529467d9d69ac9e09cacf98a6d61d781c2c76
55
refs/heads/try: aee614fc4973262a5a68efc643026e2b1458d65b

trunk/src/libstd/io/tempfile.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ use sync::atomic;
2626
///
2727
/// # Examples
2828
///
29-
/// ```
30-
/// # fn main() {}
31-
/// # fn foo () {
29+
/// ```no_run
3230
/// use std::io::TempDir;
3331
///
3432
/// {
@@ -41,7 +39,7 @@ use sync::atomic;
4139
/// // get the path of the temporary directory without affecting the wrapper
4240
/// let tmppath = tmpdir.path();
4341
///
44-
/// println!("The path of temporary directory is {}", tmppath.as_str().unwrap());
42+
/// println!("The path of temporary directory is {}", tmppath.display());
4543
///
4644
/// // the temporary directory is automatically removed when tmpdir goes
4745
/// // out of scope at the end of the block
@@ -56,7 +54,7 @@ use sync::atomic;
5654
/// // get the path of the temporary directory and disable automatic deletion in the wrapper
5755
/// let tmppath = tmpdir.into_inner();
5856
///
59-
/// println!("The path of the not-so-temporary directory is {}", tmppath.as_str().unwrap());
57+
/// println!("The path of the not-so-temporary directory is {}", tmppath.display());
6058
///
6159
/// // the temporary directory is not removed here
6260
/// // because the directory is detached from the wrapper
@@ -74,7 +72,6 @@ use sync::atomic;
7472
/// Err(e) => panic!("couldn't remove temporary directory: {}", e)
7573
/// };
7674
/// }
77-
/// # }
7875
/// ```
7976
pub struct TempDir {
8077
path: Option<Path>,

0 commit comments

Comments
 (0)