Since the serde.rs file expects String to be made available by the prelude the compilation fails if serde is activated without std.
> cargo build
Compiling ulid v1.0.0
error[E0433]: failed to resolve: use of undeclared type `String`
--> ulid-1.0.0/src/serde.rs:28:32
|
28 | let deserialized_str = String::deserialize(deserializer)?;
| ^^^^^^ use of undeclared type `String`
I propose that when the std feature is used it will depend on serde?/std and by default the optional serde dependency has { default-features = false, features = ["alloc", "derive"] }. I'll make a PR for this sometimes this coming week if no one else beats me to it.
Since the
serde.rs
file expectsString
to be made available by the prelude the compilation fails ifserde
is activated withoutstd
.I propose that when the
std
feature is used it will depend onserde?/std
and by default the optionalserde
dependency has{ default-features = false, features = ["alloc", "derive"] }
. I'll make a PR for this sometimes this coming week if no one else beats me to it.