You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I stumbled around some confusing behaviour with regards to no_std builds:
use serde::{Deserialize,Serialize};#[derive(Deserialize,Serialize)]structTesting<'a>{#[serde(with = "serde_bytes")]testing:&'a[u8],}
Compiles if the std or alloc feature is enabled, but doesn't compile if it isn't.
I do not understand why the deserialize function is behind such a feature flag.
I understand that serde_bytes only changes the serialization of &[u8] since serde's implementation is already optimized, so you can get around the issue with
Hi!
I stumbled around some confusing behaviour with regards to
no_std
builds:Compiles if the
std
oralloc
feature is enabled, but doesn't compile if it isn't.I do not understand why the
deserialize
function is behind such a feature flag.I understand that
serde_bytes
only changes the serialization of&[u8]
since serde's implementation is already optimized, so you can get around the issue withBut:
#[serde(with = "serde_bytes")]
rustc
can't understand the problem (though recent version do correctly point out the feature flag).Can this feature-gate be removed?
Thanks
The text was updated successfully, but these errors were encountered: