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: windows build error + navigate by 2 #19

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

AntoniosBarotsis
Copy link
Contributor

I am not sure if either of these are Windows specific so let me know if they (don't) work for you on other platforms.

Build Error

Running cargo install or just build results in the following:

error[E0283]: type annotations needed
   --> src\app.rs:180:10
    |
180 |         .constraints(constraints.as_ref())
    |          ^^^^^^^^^^^             ------ type must be known at this point
    |          |
    |          cannot infer type of the type parameter `C` declared on the method `constraints`
    |
    = note: multiple `impl`s satisfying `Vec<Constraint>: AsRef<_>` found in the `alloc` crate:
            - impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
              where A: Allocator;
            - impl<T, A> AsRef<[T]> for Vec<T, A>
              where A: Allocator;
help: consider specifying the generic argument
    |
180 |         .constraints::<&T>(constraints.as_ref())
    |                     ++++++

For more information about this error, try `rustc --explain E0283`.
error: could not compile `projclean` (bin "projclean") due to previous error

Not sure how this is not a problem in other platforms but it works for me now.

Navigating by 2

Using the up and down arrow keys causes the menu selection to move twice. This is because key events are fired both on press down and on release. I am again confused about how this was not noticed before which leads me to believe some weird platform-specific business is going on in here perhaps?

In any case, this likely affects other parts of the relevant match case, I didn't make any edits as I won't be using any of the other keys and I don't know if this is just a me problem or not. Let me know if you want me to look into them as well for the sake of the PR.

@sigoden sigoden changed the title Fix windows build error + navigate by 2 fix: windows build error + navigate by 2 Dec 8, 2023
@sigoden sigoden merged commit 4eeb9ee into sigoden:main Dec 8, 2023
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants