treewide: format with nightly rustfmt; auto-fix Clippy lints
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I15d9215ab506b37954468d99746098326a6a6964
This commit is contained in:
parent
10a118bd50
commit
73919f2f9e
30 changed files with 144 additions and 151 deletions
|
|
@ -10,7 +10,7 @@ use tokio::process::Command;
|
|||
|
||||
use crate::{error::ApiError, state::AppState};
|
||||
|
||||
/// Serve NARInfo for a store path hash.
|
||||
/// Serve `NARInfo` for a store path hash.
|
||||
/// GET /nix-cache/{hash}.narinfo
|
||||
async fn narinfo(
|
||||
State(state): State<AppState>,
|
||||
|
|
@ -68,7 +68,7 @@ async fn narinfo(
|
|||
};
|
||||
|
||||
let nar_hash = entry.get("narHash").and_then(|v| v.as_str()).unwrap_or("");
|
||||
let nar_size = entry.get("narSize").and_then(|v| v.as_u64()).unwrap_or(0);
|
||||
let nar_size = entry.get("narSize").and_then(serde_json::Value::as_u64).unwrap_or(0);
|
||||
let store_path = entry
|
||||
.get("path")
|
||||
.and_then(|v| v.as_str())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue