Skip to content
This repository was archived by the owner on Aug 20, 2021. It is now read-only.

Commit 949a2b3

Browse files
committed
Merge pull request #7 from chills42/master
format code with rustfmt
2 parents 4736016 + faa77e0 commit 949a2b3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ impl TempDir {
4242
/// deleted once the returned wrapper is destroyed.
4343
///
4444
/// If no directory can be created, `Err` is returned.
45-
pub fn new_in<P: AsRef<Path>>(tmpdir: P, prefix: &str)
46-
-> io::Result<TempDir> {
45+
pub fn new_in<P: AsRef<Path>>(tmpdir: P, prefix: &str) -> io::Result<TempDir> {
4746
let storage;
4847
let mut tmpdir = tmpdir.as_ref();
4948
if !tmpdir.is_absolute() {
@@ -68,7 +67,7 @@ impl TempDir {
6867
match fs::create_dir(&path) {
6968
Ok(_) => return Ok(TempDir { path: Some(path) }),
7069
Err(ref e) if e.kind() == ErrorKind::AlreadyExists => {}
71-
Err(e) => return Err(e)
70+
Err(e) => return Err(e),
7271
}
7372
}
7473

@@ -109,7 +108,7 @@ impl TempDir {
109108
fn cleanup_dir(&mut self) -> io::Result<()> {
110109
match self.path {
111110
Some(ref p) => fs::remove_dir_all(p),
112-
None => Ok(())
111+
None => Ok(()),
113112
}
114113
}
115114
}

0 commit comments

Comments
 (0)