mirror of
https://github.com/Steffo99/distributed-arcade.git
synced 2024-11-21 23:54:25 +00:00
Clippy fixes
This commit is contained in:
parent
67c94fdf50
commit
aa219945fe
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ async fn main() {
|
||||||
.route("/score/", put(routes::score::route_score_put))
|
.route("/score/", put(routes::score::route_score_put))
|
||||||
.layer(axum::Extension(rclient))
|
.layer(axum::Extension(rclient))
|
||||||
.layer(tower_http::cors::CorsLayer::new()
|
.layer(tower_http::cors::CorsLayer::new()
|
||||||
.allow_origin("*")
|
.allow_origin("*".parse::<axum::http::HeaderValue>().expect("* to be a valid origin"))
|
||||||
);
|
);
|
||||||
|
|
||||||
log::info!("Starting Axum server...");
|
log::info!("Starting Axum server...");
|
||||||
|
|
|
@ -99,7 +99,7 @@ pub(crate) async fn route_board_get(
|
||||||
|
|
||||||
log::trace!("Building score retrieval command...");
|
log::trace!("Building score retrieval command...");
|
||||||
let mut cmd = redis::Cmd::new();
|
let mut cmd = redis::Cmd::new();
|
||||||
let mut cmd_with_args = cmd.arg("ZRANGE").arg(&scores_key).arg(&offset).arg(&offset + &size);
|
let mut cmd_with_args = cmd.arg("ZRANGE").arg(&scores_key).arg(&offset).arg(offset + size);
|
||||||
if let SortingOrder::Descending = &order {
|
if let SortingOrder::Descending = &order {
|
||||||
cmd_with_args = cmd_with_args.arg("REV");
|
cmd_with_args = cmd_with_args.arg("REV");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue