From 9f00cb94da7c558171bd6eb5cb2985b5be9c7391 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Tue, 12 Sep 2023 23:01:24 -0400 Subject: [PATCH] Fix build warning --- src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index 17f13ae..2a1a58a 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,7 +1,7 @@ // use kakplugin::Selection; use regex::Regex; use std::{ - borrow::{Borrow, Cow}, + borrow::Cow, collections::hash_map::DefaultHasher, hash::{Hash, Hasher}, }; @@ -33,7 +33,7 @@ pub fn get_key<'sel>( // If they requested a regex match, set the key to the string slice of that match if let Some(regex_match) = (|| { // let captures = regex.as_ref()?.captures(&key)?; - let captures = regex.as_ref()?.captures(key.borrow())?; + let captures = regex.as_ref()?.captures(key)?; captures .get(1) .or_else(|| captures.get(0))