summaryrefslogtreecommitdiffstats
path: root/src/commands/delete_files.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2019-06-23 23:39:36 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2019-06-23 23:39:36 -0400
commita140825eb453173323df75eba546f1fb7c9dc47b (patch)
tree34460244a3d89a9e6e302911be2f3c7cdd9a8f46 /src/commands/delete_files.rs
parenta50ab8c76f8467e7f023a9d6098b50027c35c3a6 (diff)
make use of std::io::Result
Diffstat (limited to 'src/commands/delete_files.rs')
-rw-r--r--src/commands/delete_files.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/commands/delete_files.rs b/src/commands/delete_files.rs
index 4d7924b..045798f 100644
--- a/src/commands/delete_files.rs
+++ b/src/commands/delete_files.rs
@@ -20,7 +20,7 @@ impl DeleteFiles {
"delete_files"
}
- pub fn remove_files(paths: &[&path::PathBuf]) -> Result<(), std::io::Error> {
+ pub fn remove_files(paths: &[&path::PathBuf]) -> std::io::Result<()> {
for path in paths {
if let Ok(metadata) = fs::symlink_metadata(path) {
if metadata.is_dir() {
@@ -33,10 +33,7 @@ impl DeleteFiles {
Ok(())
}
- fn delete_files(
- context: &mut JoshutoContext,
- view: &JoshutoView,
- ) -> Result<(), std::io::Error> {
+ fn delete_files(context: &mut JoshutoContext, view: &JoshutoView) -> std::io::Result<()> {
ui::wprint_msg(&view.bot_win, "Delete selected files? (Y/n)");
ncurses::timeout(-1);
ncurses::doupdate();