From a76d8cfba9983d0713223650c0756845a0f7dbd1 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Thu, 19 Dec 2024 07:52:08 -0500 Subject: [PATCH] chore: fix formatting and new lints --- Cargo.lock | 22 +++++++++++----------- src/accountmanager.rs | 2 +- src/main.rs | 2 +- src/tui.rs | 4 ++-- steamguard/Cargo.toml | 8 ++++---- steamguard/src/steamapi/phone.rs | 3 ++- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fdc8b1cf..091bd2fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -2277,9 +2277,9 @@ dependencies = [ [[package]] name = "protobuf" -version = "3.5.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df67496db1a89596beaced1579212e9b7c53c22dca1d9745de00ead76573d514" +checksum = "a3a7c64d9bf75b1b8d981124c14c179074e8caa7dfe7b6a12e6222ddcd0c8f72" dependencies = [ "once_cell", "protobuf-support", @@ -2288,9 +2288,9 @@ dependencies = [ [[package]] name = "protobuf-codegen" -version = "3.5.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab09155fad2d39333d3796f67845d43e29b266eea74f7bc93f153f707f126dc" +checksum = "e26b833f144769a30e04b1db0146b2aaa53fd2fd83acf10a6b5f996606c18144" dependencies = [ "anyhow", "once_cell", @@ -2303,9 +2303,9 @@ dependencies = [ [[package]] name = "protobuf-json-mapping" -version = "3.5.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "781abbf9eedba12bd3496bc019d24d2f683adc2b5291d8d0acb39dbddc7c2a02" +checksum = "9b445cf83c9303695e6c423d269759e139b6182d2f1171e18afda7078a764336" dependencies = [ "protobuf", "protobuf-support", @@ -2314,9 +2314,9 @@ dependencies = [ [[package]] name = "protobuf-parse" -version = "3.5.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a16027030d4ec33e423385f73bb559821827e9ec18c50e7874e4d6de5a4e96f" +checksum = "322330e133eab455718444b4e033ebfac7c6528972c784fcde28d2cc783c6257" dependencies = [ "anyhow", "indexmap", @@ -2330,9 +2330,9 @@ dependencies = [ [[package]] name = "protobuf-support" -version = "3.5.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e2d30ab1878b2e72d1e2fc23ff5517799c9929e2cf81a8516f9f4dcf2b9cf3" +checksum = "b088fd20b938a875ea00843b6faf48579462630015c3788d397ad6a786663252" dependencies = [ "thiserror", ] diff --git a/src/accountmanager.rs b/src/accountmanager.rs index bb502ea1..1d6687a6 100644 --- a/src/accountmanager.rs +++ b/src/accountmanager.rs @@ -257,7 +257,7 @@ impl AccountManager { /// Return all loaded accounts. Order is not guarenteed. #[allow(dead_code)] pub fn get_all_loaded(&self) -> Vec>> { - return self.accounts.values().cloned().collect(); + self.accounts.values().cloned().collect() } #[allow(dead_code)] diff --git a/src/main.rs b/src/main.rs index 167751aa..febacfae 100644 --- a/src/main.rs +++ b/src/main.rs @@ -319,5 +319,5 @@ fn get_mafiles_dir() -> String { } } - return paths[0].to_str().unwrap().into(); + paths[0].to_str().unwrap().into() } diff --git a/src/tui.rs b/src/tui.rs index 8c69aa45..b7a6b402 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -229,7 +229,7 @@ pub(crate) fn prompt_confirmation_menu( execute!(stdout(), LeaveAlternateScreen)?; crossterm::terminal::disable_raw_mode()?; - return Ok(( + Ok(( to_accept_idx .iter() .map(|i| confirmations[*i].clone()) @@ -238,7 +238,7 @@ pub(crate) fn prompt_confirmation_menu( .iter() .map(|i| confirmations[*i].clone()) .collect(), - )); + )) } pub(crate) fn pause() { diff --git a/steamguard/Cargo.toml b/steamguard/Cargo.toml index d1be7619..61f845ac 100644 --- a/steamguard/Cargo.toml +++ b/steamguard/Cargo.toml @@ -33,8 +33,8 @@ maplit = "1.0.2" thiserror = "1.0.26" secrecy = { version = "0.8", features = ["serde"] } zeroize = { version = "^1.6.0", features = ["std", "zeroize_derive"] } -protobuf = "3.2.0" -protobuf-json-mapping = "3.2.0" +protobuf = "3.7.1" +protobuf-json-mapping = "3.7.1" phonenumber = "0.3" serde_path_to_error = "0.1.11" hmac = "^0.12" @@ -43,5 +43,5 @@ num_enum = "0.7.2" [build-dependencies] anyhow = "^1.0" -protobuf = "3.2.0" -protobuf-codegen = "3.2.0" +protobuf = "3.7.1" +protobuf-codegen = "3.7.1" diff --git a/steamguard/src/steamapi/phone.rs b/steamguard/src/steamapi/phone.rs index fe04f233..5476b0f5 100644 --- a/steamguard/src/steamapi/phone.rs +++ b/steamguard/src/steamapi/phone.rs @@ -60,7 +60,8 @@ where &self, req: CPhone_IsAccountWaitingForEmailConfirmation_Request, access_token: &Jwt, - ) -> Result, TransportError> { + ) -> Result, TransportError> + { let req = ApiRequest::new( SERVICE_NAME, "IsAccountWaitingForEmailConfirmation",