mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-12 06:33:46 +03:00
Format Rust code using rustfmt
This commit is contained in:
parent
584d5e958c
commit
4ffb1871b8
@ -106,11 +106,10 @@ pub async fn register(
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_has_keyfile(keyfile: Arc<Mutex<Option<Vec<u8>>>>) -> Result<impl Reply, Rejection> {
|
async fn handle_has_keyfile(keyfile: Arc<Mutex<Option<Vec<u8>>>>) -> Result<impl Reply, Rejection> {
|
||||||
|
|
||||||
let keyfile_lock = keyfile.lock().unwrap();
|
let keyfile_lock = keyfile.lock().unwrap();
|
||||||
|
|
||||||
if keyfile_lock.is_none() {
|
if keyfile_lock.is_none() {
|
||||||
return Ok(warp::reply::json(&"".to_string()))
|
return Ok(warp::reply::json(&"".to_string()));
|
||||||
}
|
}
|
||||||
|
|
||||||
let encoded_keyfile = keyfile_lock.as_ref().unwrap();
|
let encoded_keyfile = keyfile_lock.as_ref().unwrap();
|
||||||
@ -122,9 +121,7 @@ async fn handle_has_keyfile(keyfile: Arc<Mutex<Option<Vec<u8>>>>) -> Result<impl
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(warp::reply::json(
|
Ok(warp::reply::json(&username))
|
||||||
&username
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_keyfile_vet(
|
async fn handle_keyfile_vet(
|
||||||
@ -188,7 +185,6 @@ async fn handle_boot(
|
|||||||
jwt_secret_bytes: jwt_secret.to_vec(),
|
jwt_secret_bytes: jwt_secret.to_vec(),
|
||||||
file_key: keygen::generate_file_key(),
|
file_key: keygen::generate_file_key(),
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
match keygen::decode_keyfile(encoded_keyfile.clone(), &info.password) {
|
match keygen::decode_keyfile(encoded_keyfile.clone(), &info.password) {
|
||||||
Ok(k) => k,
|
Ok(k) => k,
|
||||||
|
Loading…
Reference in New Issue
Block a user