Compiling config results in error E0271
"error[E0271]: type mismatch resolving for<'r> <for<'s> fn(wtftw::window_manager::WindowManager, Rc<(dyn wtftw::window_system::WindowSystem + 'static)>, &'s GeneralConfig) -> std::result::Result<wtftw::window_manager::WindowManager, anyhow::Error> {wtftw::handlers::default::restart} as FnOnce<(wtftw::window_manager::WindowManager, Rc<(dyn wtftw::window_system::WindowSystem + 'static)>, &'r GeneralConfig)>>::Output == wtftw::window_manager::WindowManager
--> src/config.rs:65:5
|
65 | add_key_handler_str!(config, w, "q", modm, restart);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct wtftw::window_manager::WindowManager, found enum std::result::Result
Why does this specific line break the config but the rest of the lines don't? it compiles fine without it, is there any fix to this?
where do you see the log of it crashing? I'm trying to change anything in the config but with no success, the terminal is still xterm despite changing to alacracitty, I'm unable to change the modkey... the config is located in ~/.wtftw/src/config,rs and I'm pressing alt + Q to reload. tbh even restarting the PC doesn't reload the config.
You have to recompile the config using cargo build. My problem is during compile time.
thanks for answering! cargo build when in ~/.wtftw/ directory or when in ~/Programming/wtftw (the cloned repo)?
➜ ~ cd .wtftw/ && cargo build
warning: path `/home/niedzwiedz/.wtftw/src/config.rs` was erroneously implicitly accepted for library `config`,
please rename the file to `src/lib.rs` or set lib.path in Cargo.toml
Updating git repository `https://github.com/Kintaro/wtftw.git`
Updating git repository `https://github.com/Kintaro/wtftw-contrib.git`
Updating crates.io index
error: no matching package named `wtftw` found
location searched: https://github.com/Kintaro/wtftw-contrib.git#e55f47df
required by package `wtftw_contrib v0.0.2 (https://github.com/Kintaro/wtftw-contrib.git#e55f47df)`
... which is depended on by `config v0.0.0 (/home/niedzwiedz/.wtftw)`
```
https://github.com/Kintaro/wtftw-contrib/issues/25#issue-802975102 it might be related to that
@vladimirlucifer Ok with some hacks I managed to resolve the dependency, the Cargo.toml had a bug in it I guess. As for your error I experienced it as well. Managed to hack it around with
add_key_handler_str!(config, w, "q", modm, |a, b, c| restart(a, b, c).unwrap());
seems like restart function returns a Result<_, _> now. I don't like how nothing really works for this project, is it even tested before pushing to master? xd
ok config compiles but my config still doesn't seem to be taken into account, terminal is still xterm and mod key is still alt despite me changing it...
@vladimirlucifer https://github.com/sminez/penrose this one is maintained and works like a charm