Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imp: gate
UnescapeBytes
struct on alloc feature
`UnescapeBytes` is documented to require the `alloc` feature and is not exposed in its raw iterator form. When building `bstr` with no default features, it emits a dead code warning: ```console $ cargo check --no-default-features Compiling memchr v2.5.0 Checking bstr v1.4.0 (/Users/lopopolo/dev/repos/bstr) warning: associated function `new` is never used --> src/escape_bytes.rs:138:19 | 138 | pub(crate) fn new<T: IntoIterator<IntoIter = I>>( | ^^^ | = note: `#[warn(dead_code)]` on by default warning: `bstr` (lib) generated 1 warning Finished dev [unoptimized + debuginfo] target(s) in 1.08s ``` This commit gates `UnescapeBytes` and its supporting impl blocks, enums and free functions behind `#[cfg(feature = "alloc")]`. This frees no default features users from paying the compile cost of this unreachable code. This commit also tweaks the CI job definition to add `-D warnings` to `RUSTFLAGS` to ensure `bstr` builds without warnings in all tested configurations. Closes #156
- Loading branch information