style: cargo fmt

next
timokoesters 2020-06-08 11:45:22 +02:00
parent 588049678b
commit bfe5b89ba4
No known key found for this signature in database
GPG Key ID: 24DA7517711A2BA4
1 changed files with 27 additions and 6 deletions

View File

@ -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();