cargo clippy

This commit is contained in:
Aleksei Voronov 2023-11-29 11:27:04 +01:00
parent 51b5d6de71
commit f6492fddc1
3 changed files with 6 additions and 6 deletions

View File

@ -43,7 +43,7 @@ impl Algo for Nederlandskie {
author_did: &str, author_did: &str,
post: &bluesky::PostRecord, post: &bluesky::PostRecord,
) -> Result<bool> { ) -> Result<bool> {
Ok(self.is_post_in_russian(&post) Ok(self.is_post_in_russian(post)
|| self.is_profile_residing_in_netherlands(author_did).await?) || self.is_profile_residing_in_netherlands(author_did).await?)
} }

View File

@ -56,7 +56,7 @@ async fn main() -> Result<()> {
} }
for did in &args.did { for did in &args.did {
database.force_profile_country(&did, &args.country).await?; database.force_profile_country(did, &args.country).await?;
println!( println!(
"Stored '{}' as the country for profile with did '{}'", "Stored '{}' as the country for profile with did '{}'",

View File

@ -19,13 +19,13 @@ pub struct Bluesky {
} }
impl Bluesky { impl Bluesky {
pub const XRPC_HOST: &str = "https://bsky.social"; pub const XRPC_HOST: &'static str = "https://bsky.social";
pub const FIREHOSE_HOST: &str = "wss://bsky.network"; pub const FIREHOSE_HOST: &'static str = "wss://bsky.network";
pub fn unauthenticated() -> Self { pub fn unauthenticated() -> Self {
Self { Self {
agent: AtpAgent::new( agent: AtpAgent::new(
ReqwestClient::new(Self::XRPC_HOST.to_owned()), ReqwestClient::new(Self::XRPC_HOST),
MemorySessionStore::default(), MemorySessionStore::default(),
), ),
} }
@ -33,7 +33,7 @@ impl Bluesky {
pub async fn login(handle: &str, password: &str) -> Result<Self> { pub async fn login(handle: &str, password: &str) -> Result<Self> {
let agent = AtpAgent::new( let agent = AtpAgent::new(
ReqwestClient::new(Self::XRPC_HOST.to_owned()), ReqwestClient::new(Self::XRPC_HOST),
MemorySessionStore::default(), MemorySessionStore::default(),
); );
agent.login(handle, password).await?; agent.login(handle, password).await?;