Skip to content

Commit

Permalink
chore(apps/hermes): switch to stable rust
Browse files Browse the repository at this point in the history
  • Loading branch information
Riateche committed Nov 5, 2024
1 parent ad04400 commit af93462
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci-pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
profile: minimal
toolchain: nightly-2024-08-04
components: rustfmt, clippy
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.82.0
components: rustfmt, clippy
- name: Install protoc
uses: arduino/setup-protoc@v3
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ repos:
- id: cargo-clippy-hermes
name: Cargo clippy for Hermes
language: "rust"
entry: cargo +nightly-2024-03-26 clippy --manifest-path ./apps/hermes/server/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
entry: cargo +1.82.0 clippy --manifest-path ./apps/hermes/server/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
pass_filenames: false
files: apps/hermes
# Hooks for Fortuna
Expand Down
8 changes: 4 additions & 4 deletions apps/hermes/server/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 apps/hermes/server/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-26"
channel = "1.82.0"
3 changes: 0 additions & 3 deletions apps/hermes/server/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#![feature(never_type)]
#![feature(btree_cursors)]

use {
anyhow::Result,
clap::{
Expand Down
2 changes: 1 addition & 1 deletion apps/hermes/server/src/network/pythnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async fn fetch_bridge_data(
}
}

pub async fn run<S>(store: Arc<S>, pythnet_ws_endpoint: String) -> Result<!>
pub async fn run<S>(store: Arc<S>, pythnet_ws_endpoint: String) -> Result<()>
where
S: Aggregates,
S: Wormhole,
Expand Down
2 changes: 1 addition & 1 deletion apps/hermes/server/src/network/wormhole.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ where
}

#[tracing::instrument(skip(opts, state))]
async fn run<S>(opts: RunOptions, state: Arc<S>) -> Result<!>
async fn run<S>(opts: RunOptions, state: Arc<S>) -> Result<()>
where
S: Wormhole,
S: Send + Sync + 'static,
Expand Down
5 changes: 2 additions & 3 deletions apps/hermes/server/src/state/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use {
HashMap,
HashSet,
},
ops::Bound,
sync::Arc,
},
strum::IntoEnumIterator,
Expand Down Expand Up @@ -300,8 +299,8 @@ async fn retrieve_message_state(

// Get the first element that is greater than or equal to the lookup time.
key_cache
.lower_bound(Bound::Included(&lookup_time))
.peek_next()
.range(lookup_time..)
.next()
.map(|(_, v)| v)
.cloned()
}
Expand Down

0 comments on commit af93462

Please sign in to comment.