Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing alloc feature error #32

Open
mccown opened this issue Jun 23, 2023 · 0 comments
Open

Missing alloc feature error #32

mccown opened this issue Jun 23, 2023 · 0 comments

Comments

@mccown
Copy link
Member

mccown commented Jun 23, 2023

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>
<Cow<'a, [T]> as From<&'a Vec>>
<Cow<'a, [T]> as From<&'a [T]>>
<Cow<'a, [T]> as From<Vec>>
<Cow<'a, str> as From<&'a String>>
<Cow<'a, str> as From<&'a str>>
<Cow<'a, str> as From>
= 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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant