clippy + fmt

This commit is contained in:
Greg Shuflin 2025-02-04 22:02:50 -08:00
parent da7e037562
commit 2a11ae6d99
3 changed files with 2 additions and 6 deletions

View File

@ -1,4 +1,3 @@
use feed_rs;
use url::Url; use url::Url;
#[derive(Debug)] #[derive(Debug)]

View File

@ -96,7 +96,7 @@ async fn update_entry_db(
/// Perform the request to fetch from the remote feed url /// Perform the request to fetch from the remote feed url
async fn fetch_new_entries(url: &Url) -> Result<Vec<Entry>, Status> { async fn fetch_new_entries(url: &Url) -> Result<Vec<Entry>, Status> {
let feed_data = fetch_feed(&url).await.map_err(|_| Status::BadGateway)?; let feed_data = fetch_feed(url).await.map_err(|_| Status::BadGateway)?;
fn get(item: Option<Text>, name: &'static str) -> String { fn get(item: Option<Text>, name: &'static str) -> String {
item.map(|t| t.content.to_string()) item.map(|t| t.content.to_string())

View File

@ -18,10 +18,7 @@ impl SessionStore {
pub fn store(&self, user_id: Uuid, secret: String) { pub fn store(&self, user_id: Uuid, secret: String) {
let mut store = self.0.write().unwrap(); let mut store = self.0.write().unwrap();
store store.entry(user_id).or_default().insert(secret);
.entry(user_id)
.or_insert_with(HashSet::new)
.insert(secret);
} }
pub fn verify(&self, user_id: Uuid, secret: &str) -> bool { pub fn verify(&self, user_id: Uuid, secret: &str) -> bool {