ethereum-types `make it work in no_std` (#42)
* fix error on nightly * make it work on no-std by disabling default ft
This commit is contained in:
parent
f064ce5782
commit
a530eec63e
17
src/hash.rs
17
src/hash.rs
|
@ -319,7 +319,7 @@ macro_rules! construct_hash {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature="heapsizeof")]
|
#[cfg(all(feature="heapsizeof", feature="libc", not(target_os = "unknown")))]
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
macro_rules! impl_heapsize_for_hash {
|
macro_rules! impl_heapsize_for_hash {
|
||||||
|
@ -332,7 +332,7 @@ macro_rules! impl_heapsize_for_hash {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(feature="heapsizeof"))]
|
#[cfg(any(not(feature="heapsizeof"), not(feature="libc"), target_os = "unknown"))]
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
macro_rules! impl_heapsize_for_hash {
|
macro_rules! impl_heapsize_for_hash {
|
||||||
|
@ -425,19 +425,6 @@ macro_rules! impl_std_for_hash_internals {
|
||||||
($from: ident, $size: tt) => {}
|
($from: ident, $size: tt) => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature="libc", not(target_os = "unknown")))]
|
|
||||||
#[macro_export]
|
|
||||||
#[doc(hidden)]
|
|
||||||
macro_rules! impl_heapsize_for_hash {
|
|
||||||
($name: ident) => {
|
|
||||||
impl $crate::heapsize::HeapSizeOf for $name {
|
|
||||||
fn heap_size_of_children(&self) -> usize {
|
|
||||||
0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(all(feature="libc", not(target_os = "unknown")))]
|
#[cfg(all(feature="libc", not(target_os = "unknown")))]
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
|
Loading…
Reference in New Issue