chore: clippy and rustfmt cleanup on new code

This commit is contained in:
2026-08-08 20:35:43 +08:00
parent c40b074b3c
commit 755330e585
6 changed files with 26 additions and 27 deletions
+5 -5
View File
@@ -92,10 +92,10 @@ async fn resolve_bsky_video(
.and_then(|(_, rest)| rest.split(|c: char| !c.is_ascii_digit()).next())
.and_then(|n| n.parse::<u64>().ok())
.unwrap_or(0);
if let Some(uri) = lines.next().filter(|u| !u.starts_with('#')) {
if bandwidth >= best.as_ref().map(|(b, _)| *b).unwrap_or(0) {
best = Some((bandwidth, uri.to_string()));
}
if let Some(uri) = lines.next().filter(|u| !u.starts_with('#'))
&& bandwidth >= best.as_ref().map(|(b, _)| *b).unwrap_or(0)
{
best = Some((bandwidth, uri.to_string()));
}
}
let Some((_, uri)) = best else {
@@ -199,7 +199,7 @@ pub async fn fetch(handle: &str, rkey: &str) -> Result<Post, FetchError> {
};
}
let text = response.text().await?;
Ok(Post::from_json(&text, rkey.to_string())?)
Post::from_json(&text, rkey.to_string())
}
#[derive(Debug)]