Skip to content

Commit

Permalink
Merge #2160
Browse files Browse the repository at this point in the history
2160: Fix clippy lints r=Deniallugo a=popzxc

Updating rust in CI is funny.

Co-authored-by: Igor Aleksanov <[email protected]>
  • Loading branch information
bors-matterlabs-dev[bot] and popzxc authored Feb 3, 2022
2 parents 53c3d51 + dc2ff04 commit 2dfb4dd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions core/bin/zksync_core/src/state_keeper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ impl ZkSyncStateKeeper {
let non_executed_op = self
.state
.priority_op_to_zksync_op(priority_op.data.clone());

#[allow(clippy::question_mark)] // False positive, we aren't returning `Result`.
if self
.pending_block
.gas_counter
Expand Down
4 changes: 2 additions & 2 deletions core/lib/types/src/tx/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ impl Order {
"Ratio: {sell}:{buy}\n\
Address: {recipient:?}\n\
Nonce: {nonce}",
sell = self.price.0.to_string(),
buy = self.price.1.to_string(),
sell = self.price.0,
buy = self.price.1,
recipient = self.recipient_address,
nonce = self.nonce
)
Expand Down
12 changes: 6 additions & 6 deletions core/lib/types/src/tx/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fn test_print_swap_for_protocol() {

let print_signer = |name, key: PrivateKey<Bn256>| {
println!("Signer ({}):", name);
println!("Private key: {}", key.0.to_string());
println!("Private key: {}", key.0);
let (pk_x, pk_y) = public_key_from_private(&key).0.into_xy();
println!("Public key: x: {}, y: {}\n", pk_x, pk_y);
};
Expand Down Expand Up @@ -163,7 +163,7 @@ fn test_print_transfer_for_protocol() {
);

println!("Signer:");
println!("Private key: {}", key.0.to_string());
println!("Private key: {}", key.0);
let (pk_x, pk_y) = public_key_from_private(&key).0.into_xy();
println!("Public key: x: {}, y: {}\n", pk_x, pk_y);

Expand Down Expand Up @@ -224,7 +224,7 @@ fn test_print_change_pub_key_for_protocol() {
);

println!("Signer:");
println!("Private key: {}", key.0.to_string());
println!("Private key: {}", key.0);
let (pk_x, pk_y) = public_key_from_private(&key).0.into_xy();
println!("Public key: x: {}, y: {}\n", pk_x, pk_y);

Expand Down Expand Up @@ -283,7 +283,7 @@ fn test_print_withdraw_for_protocol() {
);

println!("Signer:");
println!("Private key: {}", key.0.to_string());
println!("Private key: {}", key.0);
let (pk_x, pk_y) = public_key_from_private(&key).0.into_xy();
println!("Public key: x: {}, y: {}\n", pk_x, pk_y);

Expand Down Expand Up @@ -346,7 +346,7 @@ fn test_print_withdraw_nft_for_protocol() {
);

println!("Signer:");
println!("Private key: {}", key.0.to_string());
println!("Private key: {}", key.0);
let (pk_x, pk_y) = public_key_from_private(&key).0.into_xy();
println!("Public key: x: {}, y: {}\n", pk_x, pk_y);

Expand Down Expand Up @@ -398,7 +398,7 @@ fn test_print_mint_nft_for_protocol() {
);

println!("Signer:");
println!("Private key: {}", key.0.to_string());
println!("Private key: {}", key.0);
let (pk_x, pk_y) = public_key_from_private(&key).0.into_xy();
println!("Public key: x: {}, y: {}\n", pk_x, pk_y);

Expand Down

0 comments on commit 2dfb4dd

Please sign in to comment.