mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-06-07 06:04:47 +00:00
13 lines
225 B
Rust
13 lines
225 B
Rust
use std::fs::remove_file;
|
|
|
|
pub fn clean() {
|
|
let _ignored = remove_file("temp");
|
|
}
|
|
|
|
#[test]
|
|
fn test_clean() {
|
|
std::fs::File::create("temp").unwrap();
|
|
clean();
|
|
assert!(!std::path::Path::new("temp").exists());
|
|
}
|