Skip to content

Commit

Permalink
fix compile errors with new Rust (#854)
Browse files Browse the repository at this point in the history
* fix compile errors with new Rust

* try fixing rug compilation error
  • Loading branch information
ordian authored Aug 10, 2024
1 parent 757e2bd commit 9ff9316
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion bounded-collections/src/bounded_btree_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,10 +655,11 @@ mod test {
#[test]
#[cfg(feature = "std")]
fn container_can_derive_hash() {
#[derive(Hash)]
#[derive(Hash, Default)]
struct Foo {
bar: u8,
map: BoundedBTreeMap<String, usize, ConstU32<16>>,
}
let _foo = Foo::default();
}
}
3 changes: 2 additions & 1 deletion bounded-collections/src/bounded_btree_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,11 +579,12 @@ mod test {
#[test]
#[cfg(feature = "std")]
fn container_can_derive_hash() {
#[derive(Hash)]
#[derive(Hash, Default)]
struct Foo {
bar: u8,
set: BoundedBTreeSet<String, ConstU32<16>>,
}
let _foo = Foo::default();
}

#[cfg(feature = "serde")]
Expand Down
5 changes: 3 additions & 2 deletions bounded-collections/src/bounded_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ where
#[cfg(all(test, feature = "std"))]
mod test {
use super::*;
use crate::{bounded_vec, ConstU32, ConstU8};
use crate::{bounded_vec, ConstU32};
use codec::CompactLen;

#[test]
Expand Down Expand Up @@ -1363,8 +1363,9 @@ mod test {
#[derive(Hash)]
struct Foo<'a> {
bar: u8,
slice: BoundedSlice<'a, usize, ConstU8<8>>,
slice: BoundedSlice<'a, usize, ConstU32<4>>,
map: BoundedVec<String, ConstU32<16>>,
}
let _foo = Foo { bar: 42, slice: BoundedSlice::truncate_from(&[0, 1][..]), map: BoundedVec::default() };
}
}
1 change: 0 additions & 1 deletion fixed-hash/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ macro_rules! construct_fixed_hash {

impl $crate::core_::marker::Copy for $name {}

#[cfg_attr(feature = "dev", allow(expl_impl_clone_on_copy))]
impl $crate::core_::clone::Clone for $name {
fn clone(&self) -> $name {
*self
Expand Down
5 changes: 4 additions & 1 deletion uint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ criterion = "0.5.1"
num-bigint = "0.4.0"

[target.'cfg(all(unix, target_arch = "x86_64"))'.dev-dependencies]
rug = { version = "1.6.0", default-features = false, features = ["integer"] }
rug = { version = "1.6.0", default-features = false, features = [
"integer",
"std",
] }

[[bench]]
name = "bigint"
Expand Down

0 comments on commit 9ff9316

Please sign in to comment.