diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-06-29 22:30:26 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-06-29 22:30:26 -0400 |
commit | 9a082fe7f0633593a6e07feb404f6434bb944511 (patch) | |
tree | d63c004684793a21e82921d0416d2d1471bf8b45 /src/commands/parent_directory.rs | |
parent | 5769d9df46c824de7e8e3e25281a1b6f6970b442 (diff) |
code cleanup
Diffstat (limited to 'src/commands/parent_directory.rs')
-rw-r--r-- | src/commands/parent_directory.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/commands/parent_directory.rs b/src/commands/parent_directory.rs index f0f690d..e514f94 100644 --- a/src/commands/parent_directory.rs +++ b/src/commands/parent_directory.rs @@ -1,6 +1,6 @@ use crate::commands::{JoshutoCommand, JoshutoRunnable}; use crate::context::JoshutoContext; -use crate::error::{JoshutoError, JoshutoResult}; +use crate::error::JoshutoResult; use crate::history::DirectoryHistory; use crate::window::JoshutoView; @@ -50,9 +50,7 @@ impl std::fmt::Display for ParentDirectory { impl JoshutoRunnable for ParentDirectory { fn execute(&self, context: &mut JoshutoContext, view: &JoshutoView) -> JoshutoResult<()> { - match Self::parent_directory(context, view) { - Ok(_) => Ok(()), - Err(e) => Err(JoshutoError::from(e)), - } + Self::parent_directory(context, view)?; + Ok(()) } } |