Skip to content

Commit 8108c43

Browse files
authored
Merge pull request #289 from DaniPopes/fix-features
fix: support features
2 parents b642aa3 + 3d41993 commit 8108c43

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ jobs:
6262
run: |
6363
cargo hack check \
6464
--feature-powerset --exclude-features nightly,generic_const_exprs \
65-
--depth 1 \
66-
--all-targets
65+
--depth 1
6766
6867
codecov:
6968
# See <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/source-based-code-coverage.html>

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12+
### Fixed
13+
14+
- Fixed some support features ([#289])
15+
16+
[#289]: https://github.com/recmo/uint/pulls/289
17+
1218
## [1.10.0] - 2023-07-30
1319

1420
### Added

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ fastrlp = ["dep:fastrlp", "alloc"]
123123
num-bigint = ["dep:num-bigint", "alloc"]
124124
parity-scale-codec = ["dep:parity-scale-codec", "alloc"]
125125
primitive-types = ["dep:primitive-types"]
126-
proptest = ["dep:proptest", "alloc"]
126+
proptest = ["dep:proptest", "std"] # TODO: change to "alloc" on the next proptest release (>1.2.0)
127127
pyo3 = ["dep:pyo3", "std"]
128128
quickcheck = ["dep:quickcheck", "std"]
129129
rand = ["dep:rand"]
130-
rlp = ["dep:rlp"]
131-
serde = ["dep:serde"]
130+
rlp = ["dep:rlp", "alloc"]
131+
serde = ["dep:serde", "alloc"] # TODO: try to avoid alloc in serde impls
132132
valuable = ["dep:valuable"]
133133
zeroize = ["dep:zeroize"]
134134

src/support/scale.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#![cfg_attr(docsrs, doc(cfg(feature = "parity-scale-codec")))]
55

66
use crate::Uint;
7+
use alloc::vec::Vec;
78
use parity_scale_codec::{
89
Compact, CompactAs, Decode, Encode, EncodeAsRef, EncodeLike, Error, HasCompact, Input,
910
MaxEncodedLen, Output,

src/support/serde.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#![cfg_attr(docsrs, doc(cfg(feature = "serde")))]
55

66
use crate::{nbytes, Bits, Uint};
7+
use alloc::string::String;
78
use core::{
89
fmt::{Formatter, Result as FmtResult, Write},
910
str,
@@ -174,6 +175,7 @@ impl<'de, const BITS: usize, const LIMBS: usize> Visitor<'de> for ByteVisitor<BI
174175
mod tests {
175176
use super::*;
176177
use crate::{const_for, nlimbs};
178+
use alloc::vec::Vec;
177179
use proptest::proptest;
178180

179181
#[test]

0 commit comments

Comments
 (0)