diff --git a/helix-term/src/ui/explorer.rs b/helix-term/src/ui/explorer.rs index 24c37ed6..a8ea640a 100644 --- a/helix-term/src/ui/explorer.rs +++ b/helix-term/src/ui/explorer.rs @@ -755,11 +755,7 @@ fn close_documents(current_item_path: PathBuf, cx: &mut Context) -> Result<()> { .documents .iter() .filter_map(|(id, doc)| { - if doc - .path() - .map(|p| p.starts_with(¤t_item_path)) - .unwrap_or(false) - { + if doc.path()?.starts_with(¤t_item_path) { Some(*id) } else { None