Fix a couple of misses in serde feature

master
gramar 2 years ago
parent 5ad0e47252
commit 6ec96bcb74

@ -26,7 +26,7 @@
//!
//! ### When not to use
//! Generally don't use this if your key would have a lot of collisions being represents in 8 bits, otherwise it might be a faster alternative to hash-based maps. You should check yourself before sticking with this crate instead of `std`'s vectorised map implementations.
#![cfg_attr(not(test), no_std)]
#![cfg_attr(any(not(test), not(feature = "std")), no_std)]
#![cfg_attr(nightly, feature(test))]
#![cfg_attr(nightly, feature(drain_filter))]
#![cfg_attr(nightly, feature(never_type))]

@ -49,7 +49,7 @@ impl<K: hash::Hash, V: hash::Hash> hash::Hash for Page<K,V> {
#[cfg(feature="serde")]
const _: () = {
use serde::*;
use std::marker::PhantomData;
use core::marker::PhantomData;
impl<K,V> serde::Serialize for Page<K,V>
where K:Serialize, V: Serialize
@ -93,7 +93,7 @@ const _: () = {
Ok(Page(elems))
} else {
use serde::de::Error;
Err(A::Error::custom(format!("Expected {} elemts, got {}", MAX, i)))
Err(A::Error::custom(alloc::format!("Expected {} elemts, got {}", MAX, i)))
}
}
}

Loading…
Cancel
Save