diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-19 13:36:50 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-19 13:36:50 -0400 |
commit | 44252aa792dfae24a63cd727c1ff0bf032d8cf9f (patch) | |
tree | 9242f6769ef3e368c6c0f46ae7923461ed7f8fa3 /src/commands/mod.rs | |
parent | 97434b87b049a8567dc65adc3756ac6f13a36940 (diff) |
remove functionality from commands/mod.rs
Diffstat (limited to 'src/commands/mod.rs')
-rw-r--r-- | src/commands/mod.rs | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 57694c5..d091cd4 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -42,7 +42,6 @@ use std::path::PathBuf; use crate::context::JoshutoContext; use crate::error::JoshutoError; -use crate::structs; use crate::window::JoshutoView; #[derive(Debug)] @@ -236,26 +235,7 @@ pub fn from_args(command: &str, args: Option<&Vec<String>>) -> Option<Box<Joshut } } -pub fn collect_selected_paths(dirlist: &structs::JoshutoDirList) -> Option<Vec<PathBuf>> { - match dirlist.index { - Some(index) => { - let selected: Vec<PathBuf> = dirlist - .contents - .iter() - .filter(|entry| entry.selected) - .map(|entry| entry.path.clone()) - .collect(); - if !selected.is_empty() { - Some(selected) - } else { - Some(vec![dirlist.contents[index].path.clone()]) - } - } - None => None, - } -} - -#[allow(dead_code)] +/* pub fn split_shell_style(line: &str) -> Vec<&str> { let mut args: Vec<&str> = Vec::new(); let mut char_ind = line.char_indices(); @@ -289,3 +269,4 @@ pub fn split_shell_style(line: &str) -> Vec<&str> { } args } +*/ |