diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-02-13 08:12:05 -0500 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-02-13 08:16:27 -0500 |
commit | 89b08eb9905db22a3e9751f44440d22e114277a3 (patch) | |
tree | b5b858192aabf020aea039061d607e171cc3fb7b /src/commands/change_directory.rs | |
parent | 6042557a5e88601cb37b6067a5fdb547f6aca232 (diff) |
textfield progression
Diffstat (limited to 'src/commands/change_directory.rs')
-rw-r--r-- | src/commands/change_directory.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/commands/change_directory.rs b/src/commands/change_directory.rs index 48cf901..cd761c9 100644 --- a/src/commands/change_directory.rs +++ b/src/commands/change_directory.rs @@ -19,10 +19,7 @@ impl ChangeDirectory { "cd" } - pub fn cd( - path: &path::Path, - context: &mut JoshutoContext, - ) -> std::io::Result<()> { + pub fn cd(path: &path::Path, context: &mut JoshutoContext) -> std::io::Result<()> { std::env::set_current_dir(path)?; let curr_tab = &mut context.tabs[context.curr_tab_index]; @@ -31,14 +28,17 @@ impl ChangeDirectory { Ok(()) } - pub fn change_directories(path: &path::Path, + pub fn change_directories( + path: &path::Path, context: &mut JoshutoContext, backend: &mut TuiBackend, ) -> std::io::Result<()> { Self::cd(path, context)?; let curr_tab = &mut context.tabs[context.curr_tab_index]; - curr_tab.history.populate_to_root(&path, &context.config_t.sort_option)?; + curr_tab + .history + .populate_to_root(&path, &context.config_t.sort_option)?; Ok(()) } |