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

fix compilation error #8

Closed
joseluis opened this issue Jul 7, 2021 · 1 comment
Closed

fix compilation error #8

joseluis opened this issue Jul 7, 2021 · 1 comment

Comments

@joseluis
Copy link
Contributor

joseluis commented Jul 7, 2021

   Compiling sv v0.2.1 (../rust-sv)
error[E0283]: type annotations needed
   --> src/messages/message.rs:366:83
    |
366 |             Message::Other(s) => Err(io::Error::new(io::ErrorKind::InvalidData, s.as_ref())),
    |                                                                                 --^^^^^^--
    |                                                                                 | |
    |                                                                                 | cannot infer type for type parameter `T` declared on the trait `AsRef`
    |                                                                                 this method call resolves to `&T`
    |
    = note: cannot satisfy `String: AsRef<_>`
help: use the fully qualified path for the potential candidates
    |
366 |             Message::Other(s) => Err(io::Error::new(io::ErrorKind::InvalidData, <String as AsRef<OsStr>>::as_ref(s))),
    |                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
366 |             Message::Other(s) => Err(io::Error::new(io::ErrorKind::InvalidData, <String as AsRef<Path>>::as_ref(s))),
    |                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
366 |             Message::Other(s) => Err(io::Error::new(io::ErrorKind::InvalidData, <String as AsRef<[u8]>>::as_ref(s))),
    |                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
366 |             Message::Other(s) => Err(io::Error::new(io::ErrorKind::InvalidData, <String as AsRef<str>>::as_ref(s))),
    |                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0283`.
error: could not compile `sv
joseluis added a commit to joseluis/rust-sv that referenced this issue Jul 7, 2021
joseluis added a commit to joseluis/rust-sv that referenced this issue Jul 7, 2021
@joseluis
Copy link
Contributor Author

joseluis commented Jul 7, 2021

PR #7 should be merged, it already fixes this

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