This commit is contained in:
Edward Shen 2021-05-22 23:10:34 -04:00
parent 5fd8e86d97
commit 579d316945
Signed by: edward
GPG key ID: 19182661E818369F
3 changed files with 5 additions and 2 deletions

1
src/cache/disk.rs vendored
View file

@ -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));

View file

@ -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();

View file

@ -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) => {