Skip to content

Commit

Permalink
Fix rustc warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Varlakov <[email protected]>
  • Loading branch information
survived committed Oct 2, 2024
1 parent 95afc83 commit 0eefdda
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions givre/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ pub mod key_share {
}

mod error {
// It's currently only needed in full signing, but better keep it always in the code
#![cfg_attr(not(feature = "full-signing"), allow(dead_code, unused_imports))]

#[cfg(feature = "std")]
pub use std::error::Error as StdError;

Expand Down
1 change: 1 addition & 0 deletions givre/src/signing/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ impl<'a, C: Ciphersuite> AggregateOptions<'a, C> {
///
/// CAUTION: additive shift MUST BE derived from the extended public key obtained from
/// the key share which is used for signing by calling [`utils::derive_additive_shift`].
#[cfg(feature = "hd-wallet")]
pub(crate) fn dangerous_set_hd_additive_shift(
mut self,
hd_additive_shift: Scalar<C::Curve>,
Expand Down
4 changes: 4 additions & 0 deletions givre/src/signing/full_signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,11 @@ enum SigningOutput<C: Ciphersuite> {

/// Interactive Signing error
#[derive(Debug)]
#[cfg_attr(not(feature = "std"), allow(dead_code))]
pub struct FullSigningError(Reason);

#[derive(Debug)]
#[cfg_attr(not(feature = "std"), allow(dead_code))]
enum Reason {
NonTaprootCiphersuite,
NOverflowsU16,
Expand All @@ -324,6 +326,7 @@ enum Reason {
}

#[derive(Debug)]
#[cfg_attr(not(feature = "std"), allow(dead_code))]
enum IoError {
Send(Box<dyn crate::error::StdError + Send + Sync>),
Recv(Box<dyn crate::error::StdError + Send + Sync>),
Expand All @@ -339,6 +342,7 @@ impl IoError {
}

#[derive(Debug)]
#[cfg_attr(not(feature = "std"), allow(dead_code))]
enum Bug {
UnexpectedOutput,
AdditiveShiftWithoutHdFeature,
Expand Down
2 changes: 2 additions & 0 deletions givre/src/signing/round2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ impl<'a, C: Ciphersuite> SigningOptions<'a, C> {
///
/// CAUTION: additive shift MUST BE derived from the extended public key obtained from
/// the key share which is used for signing by calling [`utils::derive_additive_shift`].
#[cfg(feature = "hd-wallet")]
pub(crate) fn dangerous_set_hd_additive_shift(
mut self,
hd_additive_shift: Scalar<C::Curve>,
Expand Down Expand Up @@ -450,6 +451,7 @@ fn normalize_key_share<C: Ciphersuite>(
pub struct SigningError(Reason);

#[derive(Debug)]
#[cfg_attr(not(feature = "std"), allow(dead_code))]
enum Reason {
#[cfg(feature = "taproot")]
MissingTaprootMerkleRoot,
Expand Down

0 comments on commit 0eefdda

Please sign in to comment.