didcomm-rs
didcomm-rs copied to clipboard
Missing alloc feature error
After cloning the repo and typing 'cargo build' (using cargo & rust 1.70.0), I am getting an error (see below). However, if I add this line (see Modification) as the first dependency, then everything works. If I add didcomm-rs to an app of my own, I will also get the error and the modification will let it build. I don't think this is a proper fix, but it did make things work for me. Hopefully, this description is sufficient to pursue a full fix.
// ----- Modification ----- [dependencies] form_urlencoded = "1.2.0"
// ----- Error -----
% cargo build
Updating crates.io index
Compiling typenum v1.16.0
.
.
.
Compiling form_urlencoded v1.2.0
error: the alloc
feature must currently be enabled
--> /Users/test/.cargo/registry/src/index.crates.io-6f17d22bba15001f/form_urlencoded-1.2.0/src/lib.rs:24:1
|
24 | compile_error!("the alloc
feature must currently be enabled");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound Cow<'_, _>: From<PercentDecode<'_>>
is not satisfied
--> /Users/test/.cargo/registry/src/index.crates.io-6f17d22bba15001f/form_urlencoded-1.2.0/src/lib.rs:72:55
|
72 | decode_utf8_lossy(match percent_decode(&replaced).into() {
| ^^^^ the trait From<PercentDecode<'_>>
is not implemented for Cow<'_, _>
|
= help: the following other types implement trait From<T>
:
<Cow<'a, CStr> as From<&'a CStr>>
<Cow<'a, CStr> as From<&'a CString>>
<Cow<'a, CStr> as From<CString>>
<Cow<'a, [T]> as From<&'a Vec<T>>>
<Cow<'a, [T]> as From<&'a [T]>>
<Cow<'a, [T]> as From<Vec<T>>>
<Cow<'a, str> as From<&'a String>>
<Cow<'a, str> as From<&'a str>>
<Cow<'a, str> as From<String>>
= note: required for PercentDecode<'_>
to implement Into<Cow<'_, _>>
For more information about this error, try rustc --explain E0277
.
error: could not compile form_urlencoded
(lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...