Created
September 15, 2013 15:46
-
-
Save olsonjeffery/6571905 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn rmdir(&self) { | |
let p = self.get_path().to_str(); | |
match suppressed_stat(|| self.stat()) { | |
Some(s) => { | |
match s.is_dir { | |
true => rmdir(self.get_path()), | |
false => { | |
let ioerr = IoError { | |
kind: MismatchedFileTypeForOperation, | |
desc: fmt!("%s is not a directory", p), | |
detail: None | |
}; | |
io_error::cond.raise(ioerr); | |
} | |
} | |
}, | |
None => | |
io_error::cond.raise(IoError { | |
kind: PathDoesntExist, | |
desc: self.get_path().to_str() + ~" doesn't exist", | |
detail: None | |
}) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/jeff/src/rust/src/libstd/rt/io/file.rs:370:34: 370:67 error: borrowed value does not live long enough | |
/Users/jeff/src/rust/src/libstd/rt/io/file.rs:370 desc: fmt!("%s is not a directory", p), | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment