Skip to content

Commit

Permalink
Remove redundant mut modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
karbyshev committed Mar 15, 2024
1 parent 5af993e commit 6acb1ab
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 64 deletions.
22 changes: 11 additions & 11 deletions crates/apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4131,7 +4131,7 @@ pub mod args {
impl CliToSdk<TxInitAccount<SdkTypes>> for TxInitAccount<CliTypes> {
fn to_sdk(self, ctx: &mut Context) -> TxInitAccount<SdkTypes> {
let tx = self.tx.to_sdk(ctx);
let chain_ctx = ctx.borrow_mut_chain_or_exit();
let chain_ctx = ctx.borrow_chain_or_exit();

Check warning on line 4134 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L4134

Added line #L4134 was not covered by tests
TxInitAccount::<SdkTypes> {
tx,
vp_code_path: self.vp_code_path,
Expand Down Expand Up @@ -4186,7 +4186,7 @@ pub mod args {
impl CliToSdk<TxBecomeValidator<SdkTypes>> for TxBecomeValidator<CliTypes> {
fn to_sdk(self, ctx: &mut Context) -> TxBecomeValidator<SdkTypes> {
let tx = self.tx.to_sdk(ctx);
let chain_ctx = ctx.borrow_mut_chain_or_exit();
let chain_ctx = ctx.borrow_chain_or_exit();

Check warning on line 4189 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L4189

Added line #L4189 was not covered by tests
TxBecomeValidator::<SdkTypes> {
tx,
scheme: self.scheme,
Expand Down Expand Up @@ -4306,7 +4306,7 @@ pub mod args {
impl CliToSdk<TxInitValidator<SdkTypes>> for TxInitValidator<CliTypes> {
fn to_sdk(self, ctx: &mut Context) -> TxInitValidator<SdkTypes> {
let tx = self.tx.to_sdk(ctx);
let chain_ctx = ctx.borrow_mut_chain_or_exit();
let chain_ctx = ctx.borrow_chain_or_exit();

Check warning on line 4309 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L4309

Added line #L4309 was not covered by tests
TxInitValidator::<SdkTypes> {
tx,
scheme: self.scheme,
Expand Down Expand Up @@ -4455,7 +4455,7 @@ pub mod args {
impl CliToSdk<TxUpdateAccount<SdkTypes>> for TxUpdateAccount<CliTypes> {
fn to_sdk(self, ctx: &mut Context) -> TxUpdateAccount<SdkTypes> {
let tx = self.tx.to_sdk(ctx);
let chain_ctx = ctx.borrow_mut_chain_or_exit();
let chain_ctx = ctx.borrow_chain_or_exit();

Check warning on line 4458 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L4458

Added line #L4458 was not covered by tests
TxUpdateAccount::<SdkTypes> {
tx,
vp_code_path: self.vp_code_path,
Expand Down Expand Up @@ -4904,7 +4904,7 @@ pub mod args {
impl CliToSdk<RevealPk<SdkTypes>> for RevealPk<CliTypes> {
fn to_sdk(self, ctx: &mut Context) -> RevealPk<SdkTypes> {
let tx = self.tx.to_sdk(ctx);
let chain_ctx = ctx.borrow_mut_chain_or_exit();
let chain_ctx = ctx.borrow_chain_or_exit();

Check warning on line 4907 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L4907

Added line #L4907 was not covered by tests
RevealPk::<SdkTypes> {
tx,
public_key: chain_ctx.get(&self.public_key),
Expand Down Expand Up @@ -5470,7 +5470,7 @@ pub mod args {
impl CliToSdk<ConsensusKeyChange<SdkTypes>> for ConsensusKeyChange<CliTypes> {
fn to_sdk(self, ctx: &mut Context) -> ConsensusKeyChange<SdkTypes> {
let tx = self.tx.to_sdk(ctx);
let chain_ctx = ctx.borrow_mut_chain_or_exit();
let chain_ctx = ctx.borrow_chain_or_exit();

Check warning on line 5473 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L5473

Added line #L5473 was not covered by tests
ConsensusKeyChange::<SdkTypes> {
tx,
validator: chain_ctx.get(&self.validator),
Expand Down Expand Up @@ -6278,7 +6278,7 @@ pub mod args {

impl CliToSdk<Query<SdkTypes>> for Query<CliTypes> {
fn to_sdk(self, ctx: &mut Context) -> Query<SdkTypes> {
let chain_ctx = ctx.borrow_mut_chain_or_exit();
let chain_ctx = ctx.borrow_chain_or_exit();

Check warning on line 6281 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L6281

Added line #L6281 was not covered by tests
Query::<SdkTypes> {
ledger_address: chain_ctx.get(&self.ledger_address),
}
Expand Down Expand Up @@ -6333,7 +6333,7 @@ pub mod args {

use crate::wallet::CliWalletUtils;

let find_viewing_key = |w: &mut Wallet<CliWalletUtils>| {
let find_viewing_key = |w: &Wallet<CliWalletUtils>| {
w.find_viewing_key_atomic(&self.viewing_key.raw)
.expect("Failed to read from the wallet storage.")

Check warning on line 6338 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L6336-L6338

Added lines #L6336 - L6338 were not covered by tests
.unwrap_or_else(|_| {
Expand All @@ -6347,10 +6347,10 @@ pub mod args {
let viewing_key = if ctx.global_args.is_pre_genesis {
let wallet_path =
ctx.global_args.base_dir.join(PRE_GENESIS_DIR);
let mut wallet = crate::wallet::load_or_new(&wallet_path);
find_viewing_key(&mut wallet)
let wallet = crate::wallet::load_or_new(&wallet_path);
find_viewing_key(&wallet)

Check warning on line 6351 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L6350-L6351

Added lines #L6350 - L6351 were not covered by tests
} else {
find_viewing_key(&mut ctx.borrow_mut_chain_or_exit().wallet)
find_viewing_key(&ctx.borrow_chain_or_exit().wallet)

Check warning on line 6353 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L6353

Added line #L6353 was not covered by tests
};
PayAddressGen::<SdkTypes> {
alias: self.alias,
Expand Down
Loading

0 comments on commit 6acb1ab

Please sign in to comment.