1
Fork 0
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:
Steffo 2022-11-12 23:38:26 +01:00
parent 67c94fdf50
commit aa219945fe
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 2 additions and 2 deletions

View file

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

View file

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