Skip to content

Commit

Permalink
gha: fix cargofmt checks to use nightly
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
  • Loading branch information
cyphar committed Nov 30, 2024
1 parent 89ac775 commit 127867a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
# We need to use nightly Rust to check the formatting.
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --all -- --check
Expand Down
3 changes: 2 additions & 1 deletion src/capi/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ use libc::{c_char, c_int};
use once_cell::sync::Lazy;
use rand::{self, Rng};

// TODO: Switch this to using a slab or similar structure, possibly using a less heavy-weight lock?
// TODO: Switch this to using a slab or similar structure, possibly using a less
// heavy-weight lock?
// MSRV(1.80): Use LazyLock.
static ERROR_MAP: Lazy<Mutex<HashMap<CReturn, Error>>> = Lazy::new(|| Mutex::new(HashMap::new()));

Expand Down
7 changes: 5 additions & 2 deletions src/tests/test_resolve_partial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
*/

use crate::{
error::ErrorKind, flags::ResolverFlags, resolvers::PartialLookup, resolvers::ResolverBackend,
tests::common as tests_common, Root,
error::ErrorKind,
flags::ResolverFlags,
resolvers::{PartialLookup, ResolverBackend},
tests::common as tests_common,
Root,
};

use anyhow::Error;
Expand Down

0 comments on commit 127867a

Please sign in to comment.