2020-08-28 04:40:22 -05:00
|
|
|
#![allow(unused_must_use)]
|
|
|
|
#![warn(clippy::create_dir)]
|
|
|
|
|
2020-09-08 09:35:19 -05:00
|
|
|
use std::fs::create_dir_all;
|
|
|
|
|
2020-08-31 08:40:47 -05:00
|
|
|
fn create_dir() {}
|
2020-08-28 04:40:22 -05:00
|
|
|
|
|
|
|
fn main() {
|
2020-08-31 08:40:47 -05:00
|
|
|
// Should be warned
|
2020-08-28 04:40:22 -05:00
|
|
|
std::fs::create_dir("foo");
|
|
|
|
std::fs::create_dir("bar").unwrap();
|
|
|
|
|
2020-08-31 08:40:47 -05:00
|
|
|
// Shouldn't be warned
|
|
|
|
create_dir();
|
2020-08-28 04:40:22 -05:00
|
|
|
std::fs::create_dir_all("foobar");
|
|
|
|
}
|