From c0c73687af6dceb11d162707d2f3037364515773 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Wed, 3 Jun 2026 23:14:40 +0200 Subject: pkgs/lf-make-map: Account for an `Enter` without having a value set --- pkgs/by-name/lf/lf-make-map/src/mapping/interactive.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'pkgs/by-name/lf/lf-make-map/src') diff --git a/pkgs/by-name/lf/lf-make-map/src/mapping/interactive.rs b/pkgs/by-name/lf/lf-make-map/src/mapping/interactive.rs index 1ba3d5f8..b8ac27d2 100644 --- a/pkgs/by-name/lf/lf-make-map/src/mapping/interactive.rs +++ b/pkgs/by-name/lf/lf-make-map/src/mapping/interactive.rs @@ -59,12 +59,10 @@ impl MappingsTrie { fn interactive_start_inner(&self, home_path: PathBuf) -> Result { macro_rules! done { ($state:ident, $last_length:ident) => {{ - let value = self - .0 - .get(&$state) - .expect("Is some") - .value() - .expect("is some"); + let value = match self.0.get(&$state).expect("Is some").value() { + Some(value) => value, + None => return Ok(Status::Stop), + }; let path = home_path.join(&value.path); -- cgit v1.3.1