From f6492fddc141a86cc47f8a83eb7677a5617cf274 Mon Sep 17 00:00:00 2001 From: Aleksei Voronov Date: Wed, 29 Nov 2023 11:27:04 +0100 Subject: [PATCH] cargo clippy --- src/algos/nederlandskie.rs | 2 +- src/bin/force_profile_country.rs | 2 +- src/services/bluesky/client.rs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/algos/nederlandskie.rs b/src/algos/nederlandskie.rs index d060b61..dc787fc 100644 --- a/src/algos/nederlandskie.rs +++ b/src/algos/nederlandskie.rs @@ -43,7 +43,7 @@ impl Algo for Nederlandskie { author_did: &str, post: &bluesky::PostRecord, ) -> Result { - Ok(self.is_post_in_russian(&post) + Ok(self.is_post_in_russian(post) || self.is_profile_residing_in_netherlands(author_did).await?) } diff --git a/src/bin/force_profile_country.rs b/src/bin/force_profile_country.rs index 1526949..106530e 100644 --- a/src/bin/force_profile_country.rs +++ b/src/bin/force_profile_country.rs @@ -56,7 +56,7 @@ async fn main() -> Result<()> { } for did in &args.did { - database.force_profile_country(&did, &args.country).await?; + database.force_profile_country(did, &args.country).await?; println!( "Stored '{}' as the country for profile with did '{}'", diff --git a/src/services/bluesky/client.rs b/src/services/bluesky/client.rs index 7db4997..3c166e5 100644 --- a/src/services/bluesky/client.rs +++ b/src/services/bluesky/client.rs @@ -19,13 +19,13 @@ pub struct Bluesky { } impl Bluesky { - pub const XRPC_HOST: &str = "https://bsky.social"; - pub const FIREHOSE_HOST: &str = "wss://bsky.network"; + pub const XRPC_HOST: &'static str = "https://bsky.social"; + pub const FIREHOSE_HOST: &'static str = "wss://bsky.network"; pub fn unauthenticated() -> Self { Self { agent: AtpAgent::new( - ReqwestClient::new(Self::XRPC_HOST.to_owned()), + ReqwestClient::new(Self::XRPC_HOST), MemorySessionStore::default(), ), } @@ -33,7 +33,7 @@ impl Bluesky { pub async fn login(handle: &str, password: &str) -> Result { let agent = AtpAgent::new( - ReqwestClient::new(Self::XRPC_HOST.to_owned()), + ReqwestClient::new(Self::XRPC_HOST), MemorySessionStore::default(), ); agent.login(handle, password).await?;