Build from cargo fails
mamaraddio opened this issue · comments
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`