Skip to content

Commit

Permalink
Remove redundant pattern matching
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Sep 5, 2024
1 parent da542a0 commit 999eef6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ pub async fn process_file_request(state: &AppState, path: &str) -> Result<Respon
return Ok(response_file(&file_path).await);
}

if let Err(_) = fetch_and_cache(state.host.clone(), &file_path, &path).await {
if fetch_and_cache(state.host.clone(), &file_path, &path)
.await
.is_err()
{
return Err(StatusCode::NOT_FOUND);
}

Expand Down

0 comments on commit 999eef6

Please sign in to comment.