Skip to content

Commit

Permalink
chore: address lints after upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
benluelo committed Jan 11, 2024
1 parent 34c8b92 commit a96cbf5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions cosmwasm/ucs01-relay-api/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,30 +444,30 @@ mod tests {
#[test]
fn denom_origin_parse_local() {
assert_eq!(
DenomOrigin::try_from((
DenomOrigin::from((
"port-1433/channel-44/token-k",
&IbcEndpoint {
port_id: "port-1433".into(),
channel_id: "channel-44".into(),
}
)),
Ok(DenomOrigin::Local { denom: "token-k" })
DenomOrigin::Local { denom: "token-k" }
);
}

#[test]
fn denom_origin_parse_remote() {
assert_eq!(
DenomOrigin::try_from((
DenomOrigin::from((
"blabla/ok/-k",
&IbcEndpoint {
port_id: "port-1433".into(),
channel_id: "channel-44".into(),
}
)),
Ok(DenomOrigin::Remote {
DenomOrigin::Remote {
denom: "blabla/ok/-k"
})
}
);
}
}
1 change: 0 additions & 1 deletion hubble/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(result_option_inspect)]
#![feature(more_qualified_paths)]

use axum::{routing::get, Router};
Expand Down
2 changes: 1 addition & 1 deletion lib/chain-utils/src/cosmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ impl EventSource for Cosmos {
.unwrap(),
height: Height {
revision_number: chain_revision,
revision_height: height.try_into().unwrap(),
revision_height: height.into(),
}
.increment(),
event,
Expand Down
2 changes: 1 addition & 1 deletion lib/chain-utils/src/union.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ impl EventSource for Union {
.unwrap(),
height: Height {
revision_number: chain_revision,
revision_height: height.try_into().unwrap(),
revision_height: height.into(),
}.increment(),
event,
}),
Expand Down
4 changes: 2 additions & 2 deletions zerg/src/analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub fn analyze(input: String, output: String) -> HashMap<String, ChannelBenchmar
benchmarks
}

fn median(values: &Vec<u64>) -> u64 {
fn median(values: &[u64]) -> u64 {
if values.len() % 2 == 0 {
let mid = values.len() / 2;
(values[mid - 1] + values[mid]) / 2
Expand All @@ -115,7 +115,7 @@ fn median(values: &Vec<u64>) -> u64 {
}
}

fn mean(values: &Vec<u64>) -> u64 {
fn mean(values: &[u64]) -> u64 {
values.iter().sum::<u64>() / (values.len() as u64)
}

Expand Down
5 changes: 3 additions & 2 deletions zerg/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ impl Context {
pub async fn new(zerg_config: Config, output: String, is_rush: bool) -> Context {
let writer = OpenOptions::new()
.create(true)
.write(true)
.append(true)
.open(output.clone())
.unwrap();
Expand Down Expand Up @@ -297,7 +296,9 @@ impl Context {
let send: SendPacketFilter = tx
.logs
.into_iter()
.find_map(|log| SendPacketFilter::decode_log(&log.into()).ok())
.find_map(|log| {
<SendPacketFilter as EthLogDecode>::decode_log(&log.into()).ok()
})
.unwrap();

let mut evm_txs = self.evm_txs.lock().await;
Expand Down

0 comments on commit a96cbf5

Please sign in to comment.