From 1d030b9d32f539fd38f5ff3335234c5111c3303f Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Mon, 9 May 2022 07:46:52 +0100 Subject: Importer V3 (#395) * start of importer refactor * fish * resh * zsh --- src/command/client/search.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/command/client/search.rs') diff --git a/src/command/client/search.rs b/src/command/client/search.rs index 8c60bd36..de6e7961 100644 --- a/src/command/client/search.rs +++ b/src/command/client/search.rs @@ -75,11 +75,7 @@ pub struct Cmd { } impl Cmd { - pub async fn run( - self, - db: &mut (impl Database + Send + Sync), - settings: &Settings, - ) -> Result<()> { + pub async fn run(self, db: &mut impl Database, settings: &Settings) -> Result<()> { if self.interactive { let item = select_history( &self.query, @@ -257,7 +253,7 @@ impl State { async fn query_results( app: &mut State, search_mode: SearchMode, - db: &mut (impl Database + Send + Sync), + db: &mut impl Database, ) -> Result<()> { let results = match app.input.as_str() { "" => { @@ -284,7 +280,7 @@ async fn query_results( async fn key_handler( input: Key, search_mode: SearchMode, - db: &mut (impl Database + Send + Sync), + db: &mut impl Database, app: &mut State, ) -> Option { match input { @@ -537,7 +533,7 @@ async fn select_history( search_mode: SearchMode, filter_mode: FilterMode, style: atuin_client::settings::Style, - db: &mut (impl Database + Send + Sync), + db: &mut impl Database, ) -> Result { let stdout = stdout().into_raw_mode()?; let stdout = MouseTerminal::from(stdout); @@ -596,7 +592,7 @@ async fn run_non_interactive( after: Option, limit: Option, query: &[String], - db: &mut (impl Database + Send + Sync), + db: &mut impl Database, ) -> Result<()> { let dir = if cwd.as_deref() == Some(".") { let current = std::env::current_dir()?; -- cgit v1.3.1