1
Fork 0

test: Fixup many library unit tests

This commit is contained in:
Alex Crichton 2015-04-10 11:39:53 -07:00
parent dddfbe0441
commit 700e627cf7
26 changed files with 105 additions and 479 deletions

View file

@ -123,7 +123,7 @@ pub struct WalkDir {
/// Opening a file for both reading and writing, as well as creating it if it
/// doesn't exist:
///
/// ```
/// ```no_run
/// use std::fs::OpenOptions;
///
/// let file = OpenOptions::new()
@ -1195,7 +1195,8 @@ mod tests {
pub fn tmpdir() -> TempDir {
let p = env::temp_dir();
let ret = p.join(&format!("rust-{}", rand::random::<u32>()));
let mut r = rand::thread_rng();
let ret = p.join(&format!("rust-{}", r.next_u32()));
check!(fs::create_dir(&ret));
TempDir(ret)
}