summaryrefslogtreecommitdiff
path: root/helix-term/src/ui/prompt.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-06-20 20:47:48 +0000
committerBlaž Hrastnik2022-06-21 17:26:24 +0000
commit23b5b1e25aca1dbed87fef18cc72b16852ba40a8 (patch)
tree21534a9c7ed846a51732b8cba59321e8ffdb8dac /helix-term/src/ui/prompt.rs
parent19dccade7c44619bfa414a711fe72a612e4ca358 (diff)
Remove a couple more unwraps
Diffstat (limited to 'helix-term/src/ui/prompt.rs')
-rw-r--r--helix-term/src/ui/prompt.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index 7744a161..beba8ce9 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -443,7 +443,7 @@ impl Prompt {
let input: Cow<str> = if self.line.is_empty() {
// latest value in the register list
self.history_register
- .and_then(|reg| cx.editor.registers.first(reg).cloned()) // TODO: can we avoid cloning?
+ .and_then(|reg| cx.editor.registers.first(reg))
.map(|entry| entry.into())
.unwrap_or_else(|| Cow::from(""))
} else {