Skip to content

Commit a7da71c

Browse files
committed
Switching to ErrorKind::NotADirectory finally
this variant was finally stablised in rust-lang/rust#128316
1 parent b2d6008 commit a7da71c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/tui/app.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ impl App {
135135
}
136136
} else {
137137
Err(io::Error::new(
138-
io::ErrorKind::InvalidInput,
138+
io::ErrorKind::NotADirectory,
139139
format! {"Provided filepath not a directory {}", dir.display()},
140140
))
141-
//TODO: return is not directory error
142141
}
143142
}
144143
fn write_recipe(recipe: Recipe, out_path: &Path) -> Result<(), io::Error> {
@@ -165,10 +164,9 @@ impl App {
165164
Ok(())
166165
} else {
167166
Err(io::Error::new(
168-
io::ErrorKind::InvalidInput,
167+
io::ErrorKind::NotADirectory,
169168
format! {"Provided filepath not a directory {}", dir.display()},
170169
))
171-
//TODO: return is not directory error
172170
}
173171
}
174172

0 commit comments

Comments
 (0)