Skip to content

Commit 8776337

Browse files
committed
clippy fix
1 parent db80db4 commit 8776337

21 files changed

+380
-382
lines changed

src/api/auth_api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl Auth for AuthApi {
2424
) -> Result<Response<LoginResponse>, Status> {
2525
println!("->> {:<12} - login", "GRPC_Auth_API_SERVICE");
2626

27-
let remote_address_sock = request.remote_addr().unwrap_or(SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 80));
27+
let remote_address_sock = request.remote_addr().unwrap_or(SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 80));
2828
let remote_address = remote_address_sock.to_string();
2929
let req = request.into_inner();
3030
let (valid, error_messages) = req.validate()?;

src/api/misc_api.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl Misc for MiscApi {
108108
&self,
109109
_request: Request<InstallDemoDataRequest>,
110110
) -> Result<Response<InstallDemoDataResponse>, Status> {
111-
println!("request: {:?}", _request);
111+
println!("request: {_request:?}");
112112

113113
let sql = "
114114
CREATE pages:wvb4100904eaf3ykz64c CONTENT {
@@ -400,11 +400,11 @@ impl Misc for MiscApi {
400400
)
401401
.await?;
402402

403-
println!("Created admin user: {:?}", created_admin_user);
403+
println!("Created admin user: {created_admin_user:?}");
404404

405405
let reply = InstallDemoDataResponse {};
406406

407-
println!("response: {:?}", reply);
407+
println!("response: {reply:?}");
408408
Ok(Response::new(reply))
409409
}
410410

@@ -430,7 +430,7 @@ impl Misc for MiscApi {
430430
tokio::fs::remove_file("public/install_demo").await?;
431431
let reply = DeleteDemoDataResponse {};
432432

433-
println!("response: {:?}", reply);
433+
println!("response: {reply:?}");
434434
Ok(Response::new(reply))
435435
}
436436
}

0 commit comments

Comments
 (0)