commit 6c63c25e7c69721296be8aad9ba52b7953c05d87
parent 1efad548193774c674a4c10628d62946ad3b5729
Author: William Casarin <jb55@jb55.com>
Date: Thu, 18 Dec 2025 11:08:33 -0800
clippy fixes
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/html.rs b/src/html.rs
@@ -1,15 +1,15 @@
use crate::Error;
use crate::{
- Notecrumbs,
abbrev::{abbrev_str, abbreviate},
- render::{NoteAndProfileRenderData, PROFILE_FEED_RECENT_LIMIT, ProfileRenderData},
+ render::{NoteAndProfileRenderData, ProfileRenderData, PROFILE_FEED_RECENT_LIMIT},
+ Notecrumbs,
};
use ammonia::Builder as HtmlSanitizer;
use http_body_util::Full;
-use hyper::{Request, Response, StatusCode, body::Bytes, header};
+use hyper::{body::Bytes, header, Request, Response, StatusCode};
use nostr_sdk::prelude::{Nip19, PublicKey, ToBech32};
use nostrdb::{BlockType, Blocks, Filter, Mention, Ndb, Note, NoteKey, Transaction};
-use pulldown_cmark::{Options, Parser, html};
+use pulldown_cmark::{html, Options, Parser};
use std::fmt::Write as _;
use std::io::Write;
use std::str::FromStr;
diff --git a/src/main.rs b/src/main.rs
@@ -50,7 +50,10 @@ const PROFILE_REFRESH_MAP_PRUNE_THRESHOLD: usize = 1000;
/// Tracks the state of a background profile refresh
enum ProfileRefreshState {
/// Refresh currently in progress with handle to abort if stuck
- InProgress { started: Instant, handle: AbortHandle },
+ InProgress {
+ started: Instant,
+ handle: AbortHandle,
+ },
/// Last successful refresh completed at this time
Completed(Instant),
}
@@ -209,11 +212,7 @@ async fn serve(
// Check if we have cached notes for this profile
let has_cached_notes = {
let txn = Transaction::new(&app.ndb)?;
- let notes_filter = Filter::new()
- .authors([&pubkey])
- .kinds([1])
- .limit(1)
- .build();
+ let notes_filter = Filter::new().authors([&pubkey]).kinds([1]).limit(1).build();
app.ndb
.query(&txn, &[notes_filter], 1)
.map(|results| !results.is_empty())