1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

Minor lints and clippies (#557)

This commit is contained in:
Yuri Astrakhan
2022-06-07 22:53:28 -04:00
committed by GitHub
parent 7a957cee6e
commit 912de4aa46
8 changed files with 19 additions and 22 deletions

View File

@ -103,7 +103,7 @@ mod tests {
.build(manager)
.expect("Failed to create pool.");
let mut app = test::init_service(
let app = test::init_service(
App::new()
.app_data(web::Data::new(pool.clone()))
.wrap(middleware::Logger::default())
@ -120,7 +120,7 @@ mod tests {
})
.to_request();
let resp: models::User = test::call_and_read_body_json(&mut app, req).await;
let resp: models::User = test::call_and_read_body_json(&app, req).await;
assert_eq!(resp.name, "Test user");
@ -129,7 +129,7 @@ mod tests {
.uri(&format!("/user/{}", resp.id))
.to_request();
let resp: models::User = test::call_and_read_body_json(&mut app, req).await;
let resp: models::User = test::call_and_read_body_json(&app, req).await;
assert_eq!(resp.name, "Test user");