From 23b5b1e25aca1dbed87fef18cc72b16852ba40a8 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Tue, 21 Jun 2022 05:47:48 +0900 Subject: Remove a couple more unwraps --- helix-term/src/ui/prompt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-term/src/ui/prompt.rs') 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 = 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 { -- cgit v1.2.3-70-g09d2