From bfe5b89ba43c5fb325bbd599a67e2d48694a24b7 Mon Sep 17 00:00:00 2001 From: timokoesters Date: Mon, 8 Jun 2020 11:45:22 +0200 Subject: [PATCH] style: cargo fmt --- src/client_server.rs | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/src/client_server.rs b/src/client_server.rs index 3620a00..481a40a 100644 --- a/src/client_server.rs +++ b/src/client_server.rs @@ -171,12 +171,19 @@ pub fn register_route( if let Some(auth) = &body.auth { let (worked, uiaainfo) = db .uiaa - .try_auth(&user_id, &"".to_owned(), auth, &uiaainfo, &db.users, &db.globals) + .try_auth( + &user_id, + &"".to_owned(), + auth, + &uiaainfo, + &db.users, + &db.globals, + ) .unwrap(); if !worked { return MatrixResult(Err(UiaaResponse::AuthResponse(uiaainfo))); } - // Success! + // Success! } else { db.uiaa.create(&user_id, &"".to_owned(), &uiaainfo).unwrap(); @@ -2914,12 +2921,19 @@ pub fn delete_device_route( if let Some(auth) = &body.auth { let (worked, uiaainfo) = db .uiaa - .try_auth(&user_id, &"".to_owned(), auth, &uiaainfo, &db.users, &db.globals) + .try_auth( + &user_id, + &"".to_owned(), + auth, + &uiaainfo, + &db.users, + &db.globals, + ) .unwrap(); if !worked { return MatrixResult(Err(UiaaResponse::AuthResponse(uiaainfo))); } - // Success! + // Success! } else { db.uiaa.create(&user_id, &"".to_owned(), &uiaainfo).unwrap(); @@ -2952,12 +2966,19 @@ pub fn delete_devices_route( if let Some(auth) = &body.auth { let (worked, uiaainfo) = db .uiaa - .try_auth(&user_id, &"".to_owned(), auth, &uiaainfo, &db.users, &db.globals) + .try_auth( + &user_id, + &"".to_owned(), + auth, + &uiaainfo, + &db.users, + &db.globals, + ) .unwrap(); if !worked { return MatrixResult(Err(UiaaResponse::AuthResponse(uiaainfo))); } - // Success! + // Success! } else { db.uiaa.create(&user_id, &"".to_owned(), &uiaainfo).unwrap();