From 64daf6eb2f06912f099f8ad9e2cdef258a65689e Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Sun, 26 Mar 2023 11:43:21 +0530 Subject: [PATCH] chore: clippy --- src/main.rs | 6 +++--- src/master.rs | 4 ++-- src/pages/chart/search.rs | 2 +- src/search.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5dde6b2..8e3c224 100644 --- a/src/main.rs +++ b/src/main.rs @@ -91,9 +91,9 @@ async fn main() { let (kill_introducer, introducer_fut) = Ctx::spawn_bootstrap(c, d.as_ref().clone()).await.unwrap(); - let c = ctx.clone(); - let d = db.clone(); - let f = federate.clone(); + let _c = ctx.clone(); + let _d = db.clone(); + let _f = federate.clone(); let socket_addr = settings.server.get_ip(); HttpServer::new(move || { diff --git a/src/master.rs b/src/master.rs index 05081bd..3fa15c2 100644 --- a/src/master.rs +++ b/src/master.rs @@ -122,7 +122,7 @@ impl Handler for Master { type Result = MessageResult; fn handle(&mut self, m: AddSearchMaster, ctx: &mut Self::Context) -> Self::Result { - let (tx, rx) = channel(); + let (tx, _rx) = channel(); match self.get_site(&m.0) { None => { let _ = tx.send(Ok(None)); @@ -235,7 +235,7 @@ impl Handler for Master { fn handle(&mut self, m: AddCounter, _ctx: &mut Self::Context) -> Self::Result { // let (tx, rx) = channel(); - let counter: Counter = m.counter.into(); + let counter: Counter = m.counter; let addr = counter.start(); self.add_site(addr, m.id); // tx.send(Ok(())).unwrap(); diff --git a/src/pages/chart/search.rs b/src/pages/chart/search.rs index 8fc9096..c42aa4e 100644 --- a/src/pages/chart/search.rs +++ b/src/pages/chart/search.rs @@ -90,7 +90,7 @@ pub async fn search( db: &BoxDB, query: String, ) -> ServiceResult> { - let responses = ctx.search_repository(&db, query).await?; + let responses = ctx.search_repository(db, query).await?; Ok(responses) } diff --git a/src/search.rs b/src/search.rs index 627a491..28129b0 100644 --- a/src/search.rs +++ b/src/search.rs @@ -65,7 +65,7 @@ impl Ctx { let mut federated_resp = Vec::default(); for starchart in db.search_mini_index(&query).await?.iter() { - if db.is_starchart_imported(&Url::parse(&starchart)?).await? { + if db.is_starchart_imported(&Url::parse(starchart)?).await? { log::debug!("{starchart} is imported"); continue; }