Skip to content

Commit 8529aff

Browse files
committed
Merge #183: fixes for last couple months of CI changes
ca3f2ef update and run cargo-public-api again for recent changes (Andrew Poelstra) e8f126e no-std/alloc: fix a couple "unused import" warnings (Andrew Poelstra) e4c653a docs: fix a couple unescaped `[` instances which `cargo doc` complains on (Andrew Poelstra) 9ff8288 primitives: remove unused and unconstructable Fe32Iter struct (Andrew Poelstra) 88da498 cargo: whitelist `cfg` flags for latest versions of cargo (Andrew Poelstra) 18bfc5f api: add `Freeze` marker to API files (change in cargo-public-api) (Andrew Poelstra) Pull request description: Clippy, public-api and cargo. ACKs for top commit: clarkmoody: ACK ca3f2ef Tree-SHA512: dfef5071ceaa1303bedffb46cd7a9095533559b58244271ab3428b50afcfd6debb2127ad5164be3e8c13325c3890d75682e9aaf3ed86afdbafb127560a821a18
2 parents cd20221 + ca3f2ef commit 8529aff

File tree

9 files changed

+180
-98
lines changed

9 files changed

+180
-98
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ alloc = []
1818

1919
[target.'cfg(mutate)'.dev-dependencies]
2020
mutagen = { git = "https://github.com/llogiq/mutagen" }
21+
22+
[lints.rust]
23+
unexpected_cfgs = { level = "deny", check-cfg = [ 'cfg(bench)', 'cfg(kani)', 'cfg(mutate)' ] }

api/all-features.txt

Lines changed: 59 additions & 26 deletions
Large diffs are not rendered by default.

api/alloc-only.txt

Lines changed: 58 additions & 26 deletions
Large diffs are not rendered by default.

api/no-features.txt

Lines changed: 55 additions & 26 deletions
Large diffs are not rendered by default.

src/primitives/decode.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -720,19 +720,6 @@ impl<'s> ExactSizeIterator for ByteIter<'s> {
720720
fn len(&self) -> usize { self.iter.len() }
721721
}
722722

723-
/// An iterator over a parsed HRP string data as field elements.
724-
pub struct Fe32Iter<'s> {
725-
iter: AsciiToFe32Iter<'s>,
726-
}
727-
728-
impl<'s> Iterator for Fe32Iter<'s> {
729-
type Item = Fe32;
730-
#[inline]
731-
fn next(&mut self) -> Option<Fe32> { self.iter.next() }
732-
#[inline]
733-
fn size_hint(&self) -> (usize, Option<usize>) { self.iter.size_hint() }
734-
}
735-
736723
/// Iterator adaptor that maps an iterator of valid bech32 character ASCII bytes to an
737724
/// iterator of field elements.
738725
///

src/primitives/encode.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
//! }
4141
//! ```
4242
43-
use core::iter::Iterator;
4443
use core::marker::PhantomData;
4544

4645
use crate::primitives::checksum::HrpFe32Iter;

src/primitives/gf32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const CHARS_LOWER: [char; 32] = [
5252

5353
/// Mapping from bech32 character (either case) to numeric value.
5454
///
55-
/// E.g., 'z' is CHARS_LOWER[2] and is ASCII value 122 so CHARS_INV[122] == 2
55+
/// E.g., 'z' is `CHARS_LOWER[2]` and is ASCII value 122 so `CHARS_INV[122]` == 2
5656
#[rustfmt::skip]
5757
const CHARS_INV: [i8; 128] = [
5858
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,

src/primitives/hrp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//!
1010
//! ref: [BIP-173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#user-content-Bech32)
1111
12-
#[cfg(feature = "alloc")]
12+
#[cfg(all(feature = "alloc", not(feature = "std"), not(test)))]
1313
use alloc::string::String;
1414
use core::cmp::Ordering;
1515
use core::fmt::{self, Write};

src/segwit.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,17 @@
4444
use alloc::{string::String, vec::Vec};
4545
use core::fmt;
4646

47+
#[cfg(feature = "alloc")]
4748
use crate::error::write_err;
4849
use crate::primitives::decode::SegwitCodeLengthError;
4950
#[cfg(feature = "alloc")]
5051
use crate::primitives::decode::{SegwitHrpstring, SegwitHrpstringError};
5152
use crate::primitives::gf32::Fe32;
5253
use crate::primitives::hrp::Hrp;
5354
use crate::primitives::iter::{ByteIterExt, Fe32IterExt};
55+
use crate::primitives::segwit::MAX_STRING_LENGTH;
5456
#[cfg(feature = "alloc")]
55-
use crate::primitives::segwit;
56-
use crate::primitives::segwit::{
57-
InvalidWitnessVersionError, WitnessLengthError, MAX_STRING_LENGTH,
58-
};
57+
use crate::primitives::segwit::{self, InvalidWitnessVersionError, WitnessLengthError};
5958
use crate::primitives::{Bech32, Bech32m};
6059

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

0 commit comments

Comments
 (0)