Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump rust version #1115

Merged
merged 3 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
})
}
);
}
}
6 changes: 3 additions & 3 deletions flake.lock

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

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
6 changes: 4 additions & 2 deletions tools/rust/rust.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ ... }: {
perSystem = { pkgs, system, dbg, ensureAtRepositoryRoot, ... }:
let
nightlyVersion = "2023-11-02";
nightlyVersion = "2024-01-08";
channel = "nightly-${nightlyVersion}";

# # hopefully if we ever use wasi this issue will be resolved: https://github.com/NixOS/nixpkgs/pull/146274
Expand Down Expand Up @@ -72,7 +72,9 @@
components = with availableComponents; [ rustc cargo rust-std clippy ];
};
in
{
rec {
packages.rust-home = _module.args.rust.toolchains.dev;

packages.fetchRustStdCargoLock = pkgs.writeShellApplication {
name = "fetchRustStdCargoLock";
runtimeInputs = [ pkgs.xz ];
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
Loading