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

Build from cargo fails #132

Open
mamaraddio opened this issue Feb 2, 2023 · 0 comments
Open

Build from cargo fails #132

mamaraddio opened this issue Feb 2, 2023 · 0 comments

Comments

@mamaraddio
Copy link

mamaraddio commented Feb 2, 2023

I tried to install it with cargo following the instructions on the README but this fails.
I found issue #90 so I tried setting the nightly as default but it doesn't worked.

It seams that the issue is related to the source code not properly handle return types in some functions. This is a piece of the output

error[E0277]: the `?` operator can only be used on `Result`s, not `Option`s, in a trait method that returns `Result`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/hunter-1.3.5/src/keybind.rs:399:57
    |
398 |     fn parse_section(ini: &Ini) -> HResult<Bindings<Self>> {
    |     ------------------------------------------------------ this function returns a `Result`
399 |         let section = ini.section(Some(Self::section()))?;
    |                                                         ^ use `.ok_or(...)?` to provide an error compatible with `Result<keybind::Bindings<Self>, HError>`
    |
    = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `Result<keybind::Bindings<Self>, HError>`
    = help: the following other types implement trait `FromResidual<R>`:
              <Result<T, F> as FromResidual<Result<Infallible, E>>>
              <Result<T, F> as FromResidual<Yeet<E>>>

This are the last lines of the output

Some errors have detailed explanations: E0277, E0412, E0599, E0635.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `hunter` due to 87 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `hunter v1.3.5`, intermediate artifacts can be found at `/tmp/cargo-installpsBYI5`
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