Skip to content

Commit af93462

Browse files
committed
chore(apps/hermes): switch to stable rust
1 parent ad04400 commit af93462

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

.github/workflows/ci-pre-commit.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ jobs:
3737
profile: minimal
3838
toolchain: nightly-2024-08-04
3939
components: rustfmt, clippy
40+
- uses: actions-rs/toolchain@v1
41+
with:
42+
profile: minimal
43+
toolchain: 1.82.0
44+
components: rustfmt, clippy
4045
- name: Install protoc
4146
uses: arduino/setup-protoc@v3
4247
- uses: actions/checkout@v4

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ repos:
5656
- id: cargo-clippy-hermes
5757
name: Cargo clippy for Hermes
5858
language: "rust"
59-
entry: cargo +nightly-2024-03-26 clippy --manifest-path ./apps/hermes/server/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
59+
entry: cargo +1.82.0 clippy --manifest-path ./apps/hermes/server/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
6060
pass_filenames: false
6161
files: apps/hermes
6262
# Hooks for Fortuna

apps/hermes/server/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/hermes/server/rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "nightly-2024-03-26"
2+
channel = "1.82.0"

apps/hermes/server/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![feature(never_type)]
2-
#![feature(btree_cursors)]
3-
41
use {
52
anyhow::Result,
63
clap::{

apps/hermes/server/src/network/pythnet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async fn fetch_bridge_data(
141141
}
142142
}
143143

144-
pub async fn run<S>(store: Arc<S>, pythnet_ws_endpoint: String) -> Result<!>
144+
pub async fn run<S>(store: Arc<S>, pythnet_ws_endpoint: String) -> Result<()>
145145
where
146146
S: Aggregates,
147147
S: Wormhole,

apps/hermes/server/src/network/wormhole.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ where
140140
}
141141

142142
#[tracing::instrument(skip(opts, state))]
143-
async fn run<S>(opts: RunOptions, state: Arc<S>) -> Result<!>
143+
async fn run<S>(opts: RunOptions, state: Arc<S>) -> Result<()>
144144
where
145145
S: Wormhole,
146146
S: Send + Sync + 'static,

apps/hermes/server/src/state/cache.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ use {
2525
HashMap,
2626
HashSet,
2727
},
28-
ops::Bound,
2928
sync::Arc,
3029
},
3130
strum::IntoEnumIterator,
@@ -300,8 +299,8 @@ async fn retrieve_message_state(
300299

301300
// Get the first element that is greater than or equal to the lookup time.
302301
key_cache
303-
.lower_bound(Bound::Included(&lookup_time))
304-
.peek_next()
302+
.range(lookup_time..)
303+
.next()
305304
.map(|(_, v)| v)
306305
.cloned()
307306
}

0 commit comments

Comments
 (0)