cargo fmt

This commit is contained in:
Carson McManus 2021-09-06 16:57:36 -04:00
parent 4ac3c09338
commit 1ffe464ed8
2 changed files with 14 additions and 4 deletions

View file

@ -145,7 +145,10 @@ impl Manifest {
let file = File::open(path)?;
let reader = BufReader::new(file);
let account: SteamGuardAccount = serde_json::from_reader(reader)?;
ensure!(!self.account_exists(&account.account_name), "Account already exists in manifest, please remove it first.");
ensure!(
!self.account_exists(&account.account_name),
"Account already exists in manifest, please remove it first."
);
self.add_account(account);
return Ok(());

View file

@ -213,9 +213,13 @@ fn main() {
print!("Username: ");
let username = tui::prompt();
if manifest.account_exists(&username) {
error!("Account {} already exists in manifest, remove it first", username);
error!(
"Account {} already exists in manifest, remove it first",
username
);
}
let session = do_login_raw(username).expect("Failed to log in. Account has not been linked.");
let session =
do_login_raw(username).expect("Failed to log in. Account has not been linked.");
let mut linker = AccountLinker::new(session);
let account: SteamGuardAccount;
@ -461,7 +465,10 @@ fn main() {
"Failed to remove authenticator from {}",
account.account_name
);
match tui::prompt_char("Would you like to remove it from the manifest anyway?", "yN") {
match tui::prompt_char(
"Would you like to remove it from the manifest anyway?",
"yN",
) {
'y' => {
successful.push(account.account_name.clone());
}