Skip to content

Commit 9f243bf

Browse files
committed
small code style fixes
1 parent 9cc5817 commit 9f243bf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/webserver/http.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ async fn process_sql_request(
415415
.sql_file_cache
416416
.get(app_state, &sql_path)
417417
.await
418-
.with_context(|| format!("Unable to get SQL file {:?}", sql_path))
418+
.with_context(|| format!("Unable to get SQL file {sql_path:?}"))
419419
.map_err(anyhow_err_to_actix)?;
420420
let response = render_sql(&mut req, sql_file).await?;
421421
Ok(req.into_response(response))
@@ -443,7 +443,7 @@ async fn serve_file(
443443
.file_system
444444
.modified_since(state, path.as_ref(), since, false)
445445
.await
446-
.with_context(|| format!("Unable to get modification time of file {:?}", path))
446+
.with_context(|| format!("Unable to get modification time of file {path:?}"))
447447
.map_err(anyhow_err_to_actix)?;
448448
if !modified {
449449
return Ok(HttpResponse::NotModified().finish());
@@ -453,7 +453,7 @@ async fn serve_file(
453453
.file_system
454454
.read_file(state, path.as_ref(), false)
455455
.await
456-
.with_context(|| format!("Unable to read file {:?}", path))
456+
.with_context(|| format!("Unable to read file {path:?}"))
457457
.map_err(anyhow_err_to_actix)
458458
.map(|b| {
459459
HttpResponse::Ok()

tests/index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ async fn test_files() {
7272
);
7373
} else if stem.starts_with("error_") {
7474
let rest = stem.strip_prefix("error_").unwrap();
75-
let expected_str = rest.replace("_", " ");
75+
let expected_str = rest.replace('_', " ");
7676
assert!(
7777
lowercase_body.contains(&expected_str),
7878
"{req_str}\n{body}\nexpected to contain: {expected_str}"

0 commit comments

Comments
 (0)