From 73fc799bbe09d3e923fd9df69dcf39f18f4cf3bd Mon Sep 17 00:00:00 2001 From: Robert Bennett Date: Wed, 4 Dec 2024 00:16:50 -0500 Subject: [PATCH] Renamed function to make intent clearer --- numbat-cli/src/main.rs | 2 +- numbat/src/command.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/numbat-cli/src/main.rs b/numbat-cli/src/main.rs index 4ad9138a..34b1e31f 100644 --- a/numbat-cli/src/main.rs +++ b/numbat-cli/src/main.rs @@ -370,7 +370,7 @@ impl Cli { rl.add_history_entry(&line)?; - match cmd_runner.run_command( + match cmd_runner.try_run_command( &line, CommandContext { ctx: self.context.lock().unwrap(), diff --git a/numbat/src/command.rs b/numbat/src/command.rs index 148086cc..495b9280 100644 --- a/numbat/src/command.rs +++ b/numbat/src/command.rs @@ -341,7 +341,7 @@ impl CommandRunner { /// `CommandControlFlow::Continue` or `CommandControlFlow::Return`. If the line is /// not an enabled command (whether that's because it's not a command at all, or /// it's a disabled command), then this returns `CommandControlFlow::NotACommand`. - pub fn run_command>( + pub fn try_run_command>( &self, line: &str, mut args: CommandContext, @@ -815,7 +815,7 @@ mod test { ctx, editor: &mut (), }; - assert_eq!(expected, runner.run_command(input, args).unwrap()); + assert_eq!(expected, runner.try_run_command(input, args).unwrap()); } let mut ctx = Context::new_without_importer();