Skip to content

Commit

Permalink
fix(sentinel): <- fix clippy lints in that & bump patch version number
Browse files Browse the repository at this point in the history
  • Loading branch information
gskapka committed May 7, 2024
1 parent 0cd5ae6 commit 28ae143
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/sentinel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
edition = "2021"
version = "0.2.0"
version = "0.2.1"
name = "sentinel-lib"
authors = [ "Greg Kapka <gregkapka@gmail.com>" ]
description = "shared fxnality for pTokens sentinels"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,26 @@ impl TryFrom<Vec<String>> for WebSocketMessagesResetChainArgs {
});
}

let mut arg = args[0].clone();
let arg1 = args[0].clone();

let network_id = NetworkId::try_from(&arg).map_err(|_| WebSocketMessagesError::UnrecognizedNetworkId(arg))?;
let network_id = NetworkId::try_from(&arg1).map_err(|_| WebSocketMessagesError::UnrecognizedNetworkId(arg1))?;

arg = args[1].clone();
let use_latest_block = matches!(arg.to_lowercase().as_ref(), "latest");
let arg2 = args[1].clone();
let use_latest_block = matches!(arg2.to_lowercase().as_ref(), "latest");

let block_num = if use_latest_block {
None
} else {
let n = arg.parse::<u64>().map_err(|_| WebSocketMessagesError::ParseInt(arg))?;
let n = arg2
.parse::<u64>()
.map_err(|_| WebSocketMessagesError::ParseInt(arg2))?;
Some(n)
};

arg = args[2].clone();
let confs = arg.parse::<u64>().map_err(|_| WebSocketMessagesError::ParseInt(arg))?;
let arg3 = args[2].clone();
let confs = arg3
.parse::<u64>()
.map_err(|_| WebSocketMessagesError::ParseInt(arg3))?;

let validate = matches!(args[3].as_ref(), "true");

Expand Down

0 comments on commit 28ae143

Please sign in to comment.