aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorCydiater2022-02-13 04:53:35 +0000
committerGitHub2022-02-13 04:53:35 +0000
commit7083b98a388b30e0b61caac9bf6ccc1d79eadf81 (patch)
treec510df4b2262019fc69dd3b1c9b31d3065a71eca /helix-term
parenta19a6ca01e07a111c6a5ca21a6d65888240bc2f6 (diff)
postpone clone after found (#1656)
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 9918d26c..ded5a0e4 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -445,8 +445,8 @@ impl std::str::FromStr for MappableCommand {
} else {
MappableCommand::STATIC_COMMAND_LIST
.iter()
- .cloned()
.find(|cmd| cmd.name() == s)
+ .cloned()
.ok_or_else(|| anyhow!("No command named '{}'", s))
}
}