File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: c0e8dc6dce5d847b7bf53b306d6d842e3a223c28
2
+ refs/heads/master: c910252769370a1bc039ec25ed918d81669d28ad
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 658529467d9d69ac9e09cacf98a6d61d781c2c76
5
5
refs/heads/try: aee614fc4973262a5a68efc643026e2b1458d65b
Original file line number Diff line number Diff line change @@ -26,9 +26,7 @@ use sync::atomic;
26
26
///
27
27
/// # Examples
28
28
///
29
- /// ```
30
- /// # fn main() {}
31
- /// # fn foo () {
29
+ /// ```no_run
32
30
/// use std::io::TempDir;
33
31
///
34
32
/// {
@@ -41,7 +39,7 @@ use sync::atomic;
41
39
/// // get the path of the temporary directory without affecting the wrapper
42
40
/// let tmppath = tmpdir.path();
43
41
///
44
- /// println!("The path of temporary directory is {}", tmppath.as_str().unwrap ());
42
+ /// println!("The path of temporary directory is {}", tmppath.display ());
45
43
///
46
44
/// // the temporary directory is automatically removed when tmpdir goes
47
45
/// // out of scope at the end of the block
@@ -56,7 +54,7 @@ use sync::atomic;
56
54
/// // get the path of the temporary directory and disable automatic deletion in the wrapper
57
55
/// let tmppath = tmpdir.into_inner();
58
56
///
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 ());
60
58
///
61
59
/// // the temporary directory is not removed here
62
60
/// // because the directory is detached from the wrapper
@@ -74,7 +72,6 @@ use sync::atomic;
74
72
/// Err(e) => panic!("couldn't remove temporary directory: {}", e)
75
73
/// };
76
74
/// }
77
- /// # }
78
75
/// ```
79
76
pub struct TempDir {
80
77
path : Option < Path > ,
You can’t perform that action at this time.
0 commit comments