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
With the release of v0.19 we broke the ability to use Serde in no_std contexts. When you compile with:
$ cargo build --no-default-features --features serde Compiling multihash v0.19.0 (/tmp/rust-multihash)error[E0432]: unresolved import `std` --> src/serde.rs:3:5 |3 | use std::fmt; | ^^^ use of undeclared crate or module `std`error: cannot find macro `format` in this scope --> src/serde.rs:35:46 |35 | .map_err(|err| de::Error::custom(format!("Failed to deserialize Multihash: {}", err))) | ^^^^^^error: cannot find macro `format` in this scope --> src/serde.rs:48:46 |48 | .map_err(|err| de::Error::custom(format!("Failed to deserialize Multihash: {}", err))) | ^^^^^^error[E0599]: no method named `to_bytes` found for reference `&Multihash<SIZE>` in the current scope --> src/serde.rs:17:42 |17 | serializer.serialize_bytes(&self.to_bytes()) | ^^^^^^^^ method not found in `&Multihash<SIZE>`error[E0433]: failed to resolve: use of undeclared type `Vec` --> src/serde.rs:43:25 |43 | let mut bytes = Vec::new(); | ^^^ use of undeclared type `Vec`Some errors have detailed explanations: E0432, E0433, E0599.For more information about an error, try `rustc --explain E0432`.error: could not compile `multihash` (lib) due to 5 previous errors
This is a regression as it works with v0.18.
The text was updated successfully, but these errors were encountered:
`multihash` v0.19 introduced a regression. It's no longer possible to compile
with `no_std` and `serde` feature enabled. This commit fixes that regression.
Due to generic_const_exprs not being a thing yet, we need to use unsafe code
to provide this functionality.
Fixes#336.
`multihash` v0.19 introduced a regression. It's no longer possible to compile
with `no_std` and `serde` feature enabled. This commit fixes that regression.
Due to generic_const_exprs not being a thing yet, we need to use unsafe code
to provide this functionality.
Fixes#336.
`multihash` v0.19 introduced a regression. It's no longer possible to compile
with `no_std` and `serde` feature enabled. This commit fixes that regression.
Due to generic_const_exprs not being a thing yet, we need to use unsafe code
to provide this functionality.
Fixes#336.
With the release of v0.19 we broke the ability to use Serde in no_std contexts. When you compile with:
This is a regression as it works with v0.18.
The text was updated successfully, but these errors were encountered: