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

Bump MSRV to 1.46 #659

Merged
merged 3 commits into from
Jan 30, 2022
Merged

Bump MSRV to 1.46 #659

merged 3 commits into from
Jan 30, 2022

Conversation

psychon
Copy link
Owner

@psychon psychon commented Jan 30, 2022

We depend on bitflags through nix and apparently they raised their MSRV,
so we have to follow.

Fixes: #658
Signed-off-by: Uli Schlachter psychon@znc.in

We depend on bitflags through nix and apparently they raised their MSRV,
so we have to follow.

Fixes: #658
Signed-off-by: Uli Schlachter <psychon@znc.in>
Now that our MSRV was increased, clippy has lots of "new" things it
wants use to use.

Example warning:

error: match expression looks like `matches!` macro
  --> generator/src/generator/mod.rs:84:5
   |
84 | /     match name {
85 | |         "bigreq" | "ge" | "xc_misc" | "xproto" => false,
86 | |         _ => true,
87 | |     }
   | |_____^ help: try this: `!matches!(name, "bigreq" | "ge" | "xc_misc" | "xproto")`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro

Signed-off-by: Uli Schlachter <psychon@znc.in>
This fixes the following clippy warning:

error: stripping a prefix manually
   --> src/cursor/find_cursor.rs:266:36
    |
266 |                     let mut path = &path[1..];
    |                                    ^^^^^^^^^^
    |
    = note: `-D clippy::manual-strip` implied by `-D warnings`
note: the prefix was tested here
   --> src/cursor/find_cursor.rs:264:17
    |
264 |                 if path.starts_with('~') {
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip
help: try using the `strip_prefix` method
    |
264 ~                 if let Some(<stripped>) = path.strip_prefix('~') {
265 |                     theme_dir.push(&home);
266 ~                     let mut path = <stripped>;
    |

Signed-off-by: Uli Schlachter <psychon@znc.in>
@psychon
Copy link
Owner Author

psychon commented Jan 30, 2022

To Dos from #538 when/if this is merged (I am mentioning this here explicitly (a) to remind me (or someone else who wants to work on this), and (b) because clippy forced me to handle some points already):

  • Rust 1.45:
  • Rust 1.46:
    • Required to use nix 0.23. Right now we use nix 0.22.
    • Required to use smol 1.2.5 (used in xtrace-example). Right now we use smol 0.3.

@eduardosm
Copy link
Collaborator

To Dos from #538 when/if this is merged

I'll take care of that

@psychon psychon merged commit 384b1a8 into master Jan 30, 2022
@psychon psychon deleted the bump-msrv branch January 30, 2022 15:46
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.

Nix 0.22.3 (or something in bitflags?) raises MSRV to 1.46
2 participants