Skip to content

Commit

Permalink
chore: cargo lint
Browse files Browse the repository at this point in the history
Satisfies the latest cargo lints. I took the easy way out, preserving
the existing function sigs, rather than performing a deeper refactor.
Ignored the checks on the re-export of metrics code across components.

Holding off on adding `--all-targets` to the check command, because
there's some cleanup to do in the benchmarks, related to #3556.

Revert "ci: disable -D warnings"
This reverts commit 4e7c77b.

Refs #3543.
  • Loading branch information
conorsch committed Jan 5, 2024
1 parent 2982948 commit ffabb1d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ jobs:
uses: taiki-e/install-action@nextest
- name: Load rust cache
uses: astriaorg/[email protected]
- name: Run cargo check
- name: Run cargo check, failing on warnings
# The benchmarks don't pass lint; soon!
# run: cargo check --release --all-targets
run: cargo check --release
env:
# The `-D warnings` option causes an error on warnings;
# but it caused apparently spurious warnings, so it was disabled.
# we must duplicate the rustflags from `.cargo/config.toml`.
RUSTFLAGS: "--cfg tokio_unstable"
RUSTFLAGS: "-D warnings --cfg tokio_unstable"

# If a dependency was modified, Cargo.lock may flap if not committed.
- name: Check for diffs
Expand Down
1 change: 1 addition & 0 deletions crates/core/component/governance/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
//! This trick is probably good to avoid in general, because it could be
//! confusing, but in this limited case, it seems like a clean option.

#[allow(unused_imports)]
pub use metrics::*;

/// Registers all metrics used by this crate.
Expand Down
1 change: 1 addition & 0 deletions crates/core/component/ibc/src/component/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
//! This trick is probably good to avoid in general, because it could be
//! confusing, but in this limited case, it seems like a clean option.

#[allow(unused_imports)]
pub use metrics::*;

/// Registers all metrics used by this crate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
//! This trick is probably good to avoid in general, because it could be
//! confusing, but in this limited case, it seems like a clean option.

#[allow(unused_imports)]
pub use metrics::*;

/// Registers all metrics used by this crate.
Expand Down
2 changes: 1 addition & 1 deletion crates/crypto/decaf377-frost/src/traits.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ark_ff::{Field as _, One, UniformRand, Zero};
use decaf377::{Element, FieldExt, Fr};
pub use frost_core::{frost, Ciphersuite, Field, FieldError, Group, GroupError};
pub use frost_core::{Ciphersuite, Field, FieldError, Group, GroupError};
use rand_core;

use crate::hash::Hasher;
Expand Down
2 changes: 1 addition & 1 deletion crates/crypto/tct/src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub mod frontier {
item::Item,
leaf::Leaf,
node::Node,
tier::{Nested, Tier},
tier::Tier,
top::{Top, TrackForgotten},
};
}
Expand Down
1 change: 1 addition & 0 deletions crates/view/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
//! This trick is probably good to avoid in general, because it could be
//! confusing, but in this limited case, it seems like a clean option.

#[allow(unused_imports)]
pub use metrics::*;

/// Registers all metrics used by this crate.
Expand Down

0 comments on commit ffabb1d

Please sign in to comment.