diff options
| author | Fuwn <[email protected]> | 2021-06-02 22:11:48 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-06-02 22:11:48 +0000 |
| commit | 05bcce2342eae2336bce98f359838194acb3bb18 (patch) | |
| tree | e5eab835be4dc073d3b48a5b7d422c06fa266fc9 /src/cli.rs | |
| parent | chore(manifest): update version) (diff) | |
| download | nitrous-05bcce2342eae2336bce98f359838194acb3bb18.tar.xz nitrous-05bcce2342eae2336bce98f359838194acb3bb18.zip | |
refactor(cli): use slice directly
Diffstat (limited to 'src/cli.rs')
| -rw-r--r-- | src/cli.rs | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -81,8 +81,8 @@ impl Cli { .unwrap_or("null"), ) .await, - ("clean", _) => { - for dir in vec![".nitrous/check/", ".nitrous/"] { + ("clean", _) => + for dir in &[".nitrous/check/", ".nitrous/"] { let file_type = if dir.ends_with('/') { "directory" } else { @@ -92,8 +92,7 @@ impl Cli { if let Err(e) = std::fs::remove_dir_all(dir) { warn!("cannot delete {}: {}: {}", file_type, dir, e); } - } - }, + }, _ => unreachable!(), } } |