The trait `std::convert::From<http::uri::InvalidUri>` is not implemented for `X` when it actually is [version 0.2]
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 378
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 5
Description
I have a crate with the following http dependencies (from cargo tree | grep http), after the update from http 0.1 to 0.2:
├── http v0.2.0
│ │ ├── http v0.1.21
│ ├── http v0.1.21 (*)
│ ├── http-body v0.1.0
│ │ ├── http v0.1.21 (*)
│ ├── httparse v1.3.4
│ │ ├── http v0.1.21 (*)
│ ├── http v0.1.21 (*)
│ │ ├── actix-http v0.2.11
│ │ │ │ ├── http v0.1.21 (*)
│ │ │ ├── http v0.1.21 (*)
│ │ │ ├── httparse v1.3.4 (*)
│ │ ├── actix-http v0.2.11 (*)
│ │ │ ├── http v0.1.21 (*)
│ │ │ └── http v0.1.21 (*)
│ │ │ ├── actix-http v0.2.11 (*)
│ │ │ ├── actix-http v0.2.11 (*)
When I compile my project I get the following error (one of many of the same type):
|
48 | return Either::A(future::err(e.into()));
| ^^^^ the trait `std::convert::From<http::uri::InvalidUri>` is not implemented for `error::Error`
|
= help: the following implementations were found:
<error::Error as std::convert::From<&std::io::Error>>
<error::Error as std::convert::From<failure::error::Error>>
<error::Error as std::convert::From<http::error::Error>>
<error::Error as std::convert::From<http::uri::InvalidUri>>
and 11 others
= note: required because of the requirements on the impl of `std::convert::Into<error::Error>` for `http::uri::InvalidUri`
(where error::Error is my error type) even though I clearly have the following implementation:
impl From<http::uri::InvalidUri> for error::Error {
fn from(e: http::uri::InvalidUri) -> Self {
Error::invalid_arg_msg(Entity::Uri, e)
}
}
Is this due to the fact that some of my dependencies depend themselves on a previous version of http 0.1? Is there a way to solve this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported cargo tree | grep http output and the compiler error at future::err(e.into()); compare the http versions used by the crate and its dependencies. Determine whether the shown From<http::uri::InvalidUri> implementation refers to the same dependency version, then document a reproducible resolution or the required dependency changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100