summaryrefslogtreecommitdiffstats
path: root/src/tab.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tab.rs')
-rw-r--r--src/tab.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tab.rs b/src/tab.rs
index 3e4f98f..dd8ffe5 100644
--- a/src/tab.rs
+++ b/src/tab.rs
@@ -251,10 +251,8 @@ impl Tab {
/// Move to the parent of current path
pub fn move_to_parent(&mut self) -> FmResult<()> {
let path = self.path_content.path.clone();
- if let Some(parent) = path.parent() {
- self.set_pathcontent(parent)?;
- }
- Ok(())
+ let Some(parent) = path.parent() else { return Ok(()) };
+ self.set_pathcontent(parent)
}
/// Select the parent of current node.