diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 11d9434f62..37062e81ff 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -15,13 +15,12 @@ jobs: uses: taiki-e/install-action@nextest - name: Load rust cache uses: astriaorg/buildjet-rust-cache@v2.5.1 - - name: Run cargo check - run: cargo check --release + - name: Run cargo check, failing on warnings + run: cargo check --release --all-targets 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 diff --git a/crates/bin/pcli/src/command/ceremony.rs b/crates/bin/pcli/src/command/ceremony.rs index ba0d072cc9..0fec850311 100644 --- a/crates/bin/pcli/src/command/ceremony.rs +++ b/crates/bin/pcli/src/command/ceremony.rs @@ -22,7 +22,7 @@ use penumbra_proto::{ view::v1alpha1::GasPricesRequest, }; use penumbra_transaction::memo::MemoPlaintext; -use penumbra_view::{Planner, ViewClient}; +use penumbra_view::Planner; use crate::App; diff --git a/crates/bin/pcli/src/command/view/balance.rs b/crates/bin/pcli/src/command/view/balance.rs index 4900a2b245..3f7e774a39 100644 --- a/crates/bin/pcli/src/command/view/balance.rs +++ b/crates/bin/pcli/src/command/view/balance.rs @@ -17,7 +17,7 @@ impl BalanceCmd { false } - pub async fn exec(&self, fvk: &FullViewingKey, view: &mut V) -> Result<()> { + pub async fn exec(&self, _fvk: &FullViewingKey, view: &mut V) -> Result<()> { let asset_cache = view.assets().await?; // Initialize the table diff --git a/crates/bin/pcli/src/command/view/staked.rs b/crates/bin/pcli/src/command/view/staked.rs index 32dd0f80bf..0d3cbf9d0c 100644 --- a/crates/bin/pcli/src/command/view/staked.rs +++ b/crates/bin/pcli/src/command/view/staked.rs @@ -23,7 +23,7 @@ impl StakedCmd { pub async fn exec( &self, - full_viewing_key: &FullViewingKey, + _full_viewing_key: &FullViewingKey, view_client: &mut impl ViewClient, pd_channel: Channel, ) -> Result<()> { diff --git a/crates/core/component/governance/src/metrics.rs b/crates/core/component/governance/src/metrics.rs index 8f5131ec82..668c4d13b5 100644 --- a/crates/core/component/governance/src/metrics.rs +++ b/crates/core/component/governance/src/metrics.rs @@ -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. diff --git a/crates/core/component/ibc/src/component/metrics.rs b/crates/core/component/ibc/src/component/metrics.rs index 8f5131ec82..668c4d13b5 100644 --- a/crates/core/component/ibc/src/component/metrics.rs +++ b/crates/core/component/ibc/src/component/metrics.rs @@ -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. diff --git a/crates/core/component/shielded-pool/src/component/metrics.rs b/crates/core/component/shielded-pool/src/component/metrics.rs index 8f5131ec82..668c4d13b5 100644 --- a/crates/core/component/shielded-pool/src/component/metrics.rs +++ b/crates/core/component/shielded-pool/src/component/metrics.rs @@ -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. diff --git a/crates/crypto/decaf377-frost/src/traits.rs b/crates/crypto/decaf377-frost/src/traits.rs index d0e3fede01..f29775c976 100644 --- a/crates/crypto/decaf377-frost/src/traits.rs +++ b/crates/crypto/decaf377-frost/src/traits.rs @@ -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; diff --git a/crates/crypto/tct/src/internal.rs b/crates/crypto/tct/src/internal.rs index 1b726fe66a..0b32acf559 100644 --- a/crates/crypto/tct/src/internal.rs +++ b/crates/crypto/tct/src/internal.rs @@ -115,7 +115,7 @@ pub mod frontier { item::Item, leaf::Leaf, node::Node, - tier::{Nested, Tier}, + tier::Tier, top::{Top, TrackForgotten}, }; } diff --git a/crates/view/src/metrics.rs b/crates/view/src/metrics.rs index 8f5131ec82..668c4d13b5 100644 --- a/crates/view/src/metrics.rs +++ b/crates/view/src/metrics.rs @@ -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.