aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-client/src/database.rs
diff options
context:
space:
mode:
authorConrad Ludgate <conradludgate@gmail.com>2023-03-26 15:47:38 +0100
committerGitHub <noreply@github.com>2023-03-26 15:47:38 +0100
commitbb7f00dbef3bf4c7c00c1969cb0089de51bd9ba9 (patch)
tree6ac9722a353f844c2896335d2617eb49a677b20f /atuin-client/src/database.rs
parentUpdate README.md (diff)
downloadatuin-bb7f00dbef3bf4c7c00c1969cb0089de51bd9ba9.zip
chore: use fork of skim (#803)
* use fuzzy-matcher instead of skim switch to a search-engine abstraction * fmt * fix deprecated warnings
Diffstat (limited to '')
-rw-r--r--atuin-client/src/database.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/atuin-client/src/database.rs b/atuin-client/src/database.rs
index bb4d9dfa..fa39f71b 100644
--- a/atuin-client/src/database.rs
+++ b/atuin-client/src/database.rs
@@ -41,7 +41,7 @@ pub fn current_context() -> Context {
}
#[async_trait]
-pub trait Database: Send + Sync {
+pub trait Database: Send + Sync + 'static {
async fn save(&mut self, h: &History) -> Result<()>;
async fn save_bulk(&mut self, h: &[History]) -> Result<()>;
@@ -375,7 +375,7 @@ impl Database for Sqlite {
match search_mode {
SearchMode::Prefix => sql.and_where_like_left("command", query),
SearchMode::FullText => sql.and_where_like_any("command", query),
- SearchMode::Skim | SearchMode::Fuzzy => {
+ _ => {
// don't recompile the regex on successive calls!
lazy_static! {
static ref SPLIT_REGEX: Regex = Regex::new(r" +").unwrap();