Skip to content

Commit

Permalink
no-std/alloc: fix a couple "unused import" warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
apoelstra committed Jul 5, 2024
1 parent 50b1a5c commit ba50ab5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/primitives/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
//! }
//! ```
use core::iter::Iterator;
use core::marker::PhantomData;

use crate::primitives::checksum::HrpFe32Iter;
Expand Down
2 changes: 1 addition & 1 deletion src/primitives/hrp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//!
//! ref: [BIP-173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#user-content-Bech32)
#[cfg(feature = "alloc")]
#[cfg(all(feature = "alloc", not(feature = "std"), not(test)))]
use alloc::string::String;
use core::cmp::Ordering;
use core::fmt::{self, Write};
Expand Down
7 changes: 3 additions & 4 deletions src/segwit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,17 @@
use alloc::{string::String, vec::Vec};
use core::fmt;

#[cfg(feature = "alloc")]
use crate::error::write_err;
use crate::primitives::decode::SegwitCodeLengthError;
#[cfg(feature = "alloc")]
use crate::primitives::decode::{SegwitHrpstring, SegwitHrpstringError};
use crate::primitives::gf32::Fe32;
use crate::primitives::hrp::Hrp;
use crate::primitives::iter::{ByteIterExt, Fe32IterExt};
use crate::primitives::segwit::MAX_STRING_LENGTH;
#[cfg(feature = "alloc")]
use crate::primitives::segwit;
use crate::primitives::segwit::{
InvalidWitnessVersionError, WitnessLengthError, MAX_STRING_LENGTH,
};
use crate::primitives::segwit::{self, InvalidWitnessVersionError, WitnessLengthError};
use crate::primitives::{Bech32, Bech32m};

#[rustfmt::skip] // Keep public re-exports separate.
Expand Down

0 comments on commit ba50ab5

Please sign in to comment.