Skip to content

Commit

Permalink
nightly fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ManojJiSharma committed Dec 11, 2023
1 parent 5a81c86 commit 1ad60b2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
16 changes: 8 additions & 8 deletions chains/ethereum/rpc-client/src/subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ impl Stream for EthSubscription {
Poll::Ready(Err(error)) => {
match error {
// Skip connection errors
JsonRpseeError::Transport(_)
| JsonRpseeError::RestartNeeded(_)
| JsonRpseeError::InvalidSubscriptionId
| JsonRpseeError::InvalidRequestId(_)
| JsonRpseeError::UnregisteredNotification(_)
| JsonRpseeError::SubscriptionNameConflict(_)
| JsonRpseeError::RequestTimeout
| JsonRpseeError::AlreadyStopped => {},
JsonRpseeError::Transport(_) |
JsonRpseeError::RestartNeeded(_) |
JsonRpseeError::InvalidSubscriptionId |
JsonRpseeError::InvalidRequestId(_) |
JsonRpseeError::UnregisteredNotification(_) |
JsonRpseeError::SubscriptionNameConflict(_) |
JsonRpseeError::RequestTimeout |
JsonRpseeError::AlreadyStopped => {},
JsonRpseeError::Custom(reason) => {
tracing::warn!("failed to unsubscribe: \"{reason}\"");
},
Expand Down
4 changes: 2 additions & 2 deletions chains/ethereum/server/src/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ pub fn verify_proof(proof: &Vec<Bytes>, root: &[u8], path: &Vec<u8>, value: &Vec
} else if node_list.len() == 2 {
if i == proof.len() - 1 {
// exclusion proof
if !paths_match(&node_list[0], skip_length(&node_list[0]), path, path_offset)
&& is_empty_value(value)
if !paths_match(&node_list[0], skip_length(&node_list[0]), path, path_offset) &&
is_empty_value(value)
{
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions chains/ethereum/server/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ fn get_trace_operations(trace: Trace, op_len: i64, currency: &Currency) -> Resul
if should_add {
let mut from_operation = Operation {
operation_identifier: OperationIdentifier {
index: op_len
+ i64::try_from(operations.len()).context("operation.index overflow")?,
index: op_len +
i64::try_from(operations.len()).context("operation.index overflow")?,
network_index: None,
},
related_operations: None,
Expand Down
5 changes: 2 additions & 3 deletions rosetta-crypto/src/bip32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ impl SecretKey {
fn tweak_add(&self, secret_key: &Self) -> Result<Option<Self>> {
use ecdsa::elliptic_curve::NonZeroScalar;
match (self, secret_key) {
(Self::EcdsaSecp256k1(secret), Self::EcdsaSecp256k1(secret2))
| (Self::EcdsaRecoverableSecp256k1(secret), Self::EcdsaRecoverableSecp256k1(secret2)) =>
{
(Self::EcdsaSecp256k1(secret), Self::EcdsaSecp256k1(secret2)) |
(Self::EcdsaRecoverableSecp256k1(secret), Self::EcdsaRecoverableSecp256k1(secret2)) => {
let scalar = secret.as_nonzero_scalar().as_ref();
let tweak = secret2.as_nonzero_scalar().as_ref();
let scalar: Option<NonZeroScalar<_>> =
Expand Down

0 comments on commit 1ad60b2

Please sign in to comment.