clippy
This commit is contained in:
parent
5fd8e86d97
commit
579d316945
3 changed files with 5 additions and 2 deletions
1
src/cache/disk.rs
vendored
1
src/cache/disk.rs
vendored
|
@ -174,6 +174,7 @@ async fn db_listener(
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut size_freed = 0;
|
let mut size_freed = 0;
|
||||||
|
#[allow(clippy::cast_sign_loss)]
|
||||||
for item in items {
|
for item in items {
|
||||||
size_freed += item.size as u64;
|
size_freed += item.size as u64;
|
||||||
tokio::spawn(remove_file(item.id));
|
tokio::spawn(remove_file(item.id));
|
||||||
|
|
|
@ -35,7 +35,9 @@ pub static REQUESTS_OTHER_COUNTER: Lazy<IntCounter> = Lazy::new(|| {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#[allow(clippy::shadow_unrelated)]
|
||||||
pub fn init() {
|
pub fn init() {
|
||||||
|
// we just need to initialize these, getting the values registers them.
|
||||||
let _a = CACHE_HIT_COUNTER.get();
|
let _a = CACHE_HIT_COUNTER.get();
|
||||||
let _a = CACHE_MISS_COUNTER.get();
|
let _a = CACHE_MISS_COUNTER.get();
|
||||||
let _a = REQUESTS_TOTAL_COUNTER.get();
|
let _a = REQUESTS_TOTAL_COUNTER.get();
|
||||||
|
|
|
@ -109,10 +109,10 @@ pub async fn default(state: Data<RwLockServerState>, req: HttpRequest) -> impl R
|
||||||
return ServerResponse::HttpResponse(
|
return ServerResponse::HttpResponse(
|
||||||
ErrorNotFound("Path is not valid in offline mode").into(),
|
ErrorNotFound("Path is not valid in offline mode").into(),
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
info!("Got unknown path, just proxying: {}", path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info!("Got unknown path, just proxying: {}", path);
|
||||||
|
|
||||||
let resp = match HTTP_CLIENT.get(path).send().await {
|
let resp = match HTTP_CLIENT.get(path).send().await {
|
||||||
Ok(resp) => resp,
|
Ok(resp) => resp,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
|
Loading…
Reference in a new issue