Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support features #289

Merged
merged 1 commit into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ jobs:
run: |
cargo hack check \
--feature-powerset --exclude-features nightly,generic_const_exprs \
--depth 1 \
--all-targets
--depth 1
codecov:
# See <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/source-based-code-coverage.html>
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fixed some support features ([#289])

[#289]: https://github.com/recmo/uint/pulls/289

## [1.10.0] - 2023-07-30

### Added
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ fastrlp = ["dep:fastrlp", "alloc"]
num-bigint = ["dep:num-bigint", "alloc"]
parity-scale-codec = ["dep:parity-scale-codec", "alloc"]
primitive-types = ["dep:primitive-types"]
proptest = ["dep:proptest", "alloc"]
proptest = ["dep:proptest", "std"] # TODO: change to "alloc" on the next proptest release (>1.2.0)
pyo3 = ["dep:pyo3", "std"]
quickcheck = ["dep:quickcheck", "std"]
rand = ["dep:rand"]
rlp = ["dep:rlp"]
serde = ["dep:serde"]
rlp = ["dep:rlp", "alloc"]
serde = ["dep:serde", "alloc"] # TODO: try to avoid alloc in serde impls
valuable = ["dep:valuable"]
zeroize = ["dep:zeroize"]

Expand Down
1 change: 1 addition & 0 deletions src/support/scale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#![cfg_attr(docsrs, doc(cfg(feature = "parity-scale-codec")))]

use crate::Uint;
use alloc::vec::Vec;
use parity_scale_codec::{
Compact, CompactAs, Decode, Encode, EncodeAsRef, EncodeLike, Error, HasCompact, Input,
MaxEncodedLen, Output,
Expand Down
2 changes: 2 additions & 0 deletions src/support/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#![cfg_attr(docsrs, doc(cfg(feature = "serde")))]

use crate::{nbytes, Bits, Uint};
use alloc::string::String;
use core::{
fmt::{Formatter, Result as FmtResult, Write},
str,
Expand Down Expand Up @@ -174,6 +175,7 @@ impl<'de, const BITS: usize, const LIMBS: usize> Visitor<'de> for ByteVisitor<BI
mod tests {
use super::*;
use crate::{const_for, nlimbs};
use alloc::vec::Vec;
use proptest::proptest;

#[test]
Expand Down