From ec6e9c29ac11178854063f2177dde5392e430e2e Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Fri, 3 Mar 2023 13:20:03 +0100 Subject: [PATCH] Bump MSRV to 1.62 (#2496) * Bump MSRV to 1.62 Mainly to be able to derive default enum variants. * CHANGELOG.md: Update --- .github/workflows/CICD.yml | 2 +- CHANGELOG.md | 1 + README.md | 2 +- doc/README-ja.md | 2 +- doc/README-ko.md | 2 +- doc/README-ru.md | 2 +- doc/README-zh.md | 2 +- src/paging.rs | 9 ++------- 8 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index f1778910..76705d96 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -1,7 +1,7 @@ name: CICD env: - MIN_SUPPORTED_RUST_VERSION: "1.60.0" + MIN_SUPPORTED_RUST_VERSION: "1.62.0" CICD_INTERMEDIATES_DIR: "_cicd-intermediates" on: diff --git a/CHANGELOG.md b/CHANGELOG.md index e3ebcbd0..4216e943 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Various bash completion improvements, see #2310 (@scop) - Disable completion of `cache` subcommand, see #2399 (@cyqsimon) - Signifigantly improve startup performance on macOS, see #2442 (@BlackHoleFox) +- Bump MSRV to 1.62, see #2496 (@Enselic) ## Syntaxes diff --git a/README.md b/README.md index cc7a7b6d..71859eba 100644 --- a/README.md +++ b/README.md @@ -418,7 +418,7 @@ binaries are also available: look for archives with `musl` in the file name. ### From source -If you want to build `bat` from source, you need Rust 1.60.0 or +If you want to build `bat` from source, you need Rust 1.62.0 or higher. You can then use `cargo` to build everything: ```bash diff --git a/doc/README-ja.md b/doc/README-ja.md index f23ad098..217edf85 100644 --- a/doc/README-ja.md +++ b/doc/README-ja.md @@ -366,7 +366,7 @@ ansible-galaxy install aeimer.install_bat ### From source -`bat` をソースからビルドしたいならば、Rust 1.60.0 以上の環境が必要です。 +`bat` をソースからビルドしたいならば、Rust 1.62.0 以上の環境が必要です。 `cargo` を使用してビルドすることができます: ```bash diff --git a/doc/README-ko.md b/doc/README-ko.md index 6fe1839f..bdfbc798 100644 --- a/doc/README-ko.md +++ b/doc/README-ko.md @@ -416,7 +416,7 @@ scoop install bat ### 소스에서 -`bat`의 소스를 빌드하기 위해서는, Rust 1.60.0 이상이 필요합니다. +`bat`의 소스를 빌드하기 위해서는, Rust 1.62.0 이상이 필요합니다. `cargo`를 이용해 전부 빌드할 수 있습니다: ```bash diff --git a/doc/README-ru.md b/doc/README-ru.md index f3bc4092..6932e2e0 100644 --- a/doc/README-ru.md +++ b/doc/README-ru.md @@ -344,7 +344,7 @@ ansible-galaxy install aeimer.install_bat ### Из исходников -Если вы желаете установить `bat` из исходников, вам понадобится Rust 1.60.0 или выше. После этого используйте `cargo`, чтобы все скомпилировать: +Если вы желаете установить `bat` из исходников, вам понадобится Rust 1.62.0 или выше. После этого используйте `cargo`, чтобы все скомпилировать: ```bash cargo install --locked bat diff --git a/doc/README-zh.md b/doc/README-zh.md index cbc901a1..fda720d7 100644 --- a/doc/README-zh.md +++ b/doc/README-zh.md @@ -372,7 +372,7 @@ scoop install bat ### 从源码编译 -如果你想要自己构建`bat`,那么你需要安装有高于1.58.0版本的 Rust。 +如果你想要自己构建`bat`,那么你需要安装有高于1.62.0版本的 Rust。 使用以下命令编译。 diff --git a/src/paging.rs b/src/paging.rs index e1db6a13..7f78910b 100644 --- a/src/paging.rs +++ b/src/paging.rs @@ -1,12 +1,7 @@ -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] pub enum PagingMode { Always, QuitIfOneScreen, + #[default] Never, } - -impl Default for PagingMode { - fn default() -> Self { - PagingMode::Never - } -}