mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-24 15:18:53 +00:00
cargo: update MSRV to 1.64
We need 1.64 to bump `clap` to `4.1`. We don't really need to upgrade to that, but being on an older version causes minor confusions like #1393. Rust 1.64 is very close to 6 months old at this point.
This commit is contained in:
parent
70d4a0f42e
commit
2495c8f27e
11 changed files with 15 additions and 23 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -20,7 +20,7 @@ jobs:
|
|||
rust_version: stable
|
||||
- build: linux-msrv
|
||||
os: ubuntu-latest
|
||||
rust_version: "1.61"
|
||||
rust_version: "1.64"
|
||||
- build: macos
|
||||
os: macos-latest
|
||||
rust_version: stable
|
||||
|
|
|
@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
current commit has no content and no description, such as right after
|
||||
a `jj squash`.
|
||||
|
||||
* The minimum supported Rust version (MSRV) is now 1.64.0.
|
||||
|
||||
### New features
|
||||
|
||||
* `jj git push --deleted` will remove all locally deleted branches from the remote.
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "jujutsu"
|
|||
version = "0.7.0"
|
||||
authors = ["Martin von Zweigbergk <martinvonz@google.com>"]
|
||||
edition = "2021"
|
||||
rust-version = "1.61" # Remember to update CI, contributing.md, and flake.nix
|
||||
rust-version = "1.64" # Remember to update CI, contributing.md, and flake.nix
|
||||
license = "Apache-2.0"
|
||||
description = "Jujutsu (an experimental VCS)"
|
||||
homepage = "https://github.com/martinvonz/jj"
|
||||
|
|
|
@ -117,7 +117,7 @@ These are listed roughly in order of decreasing importance.
|
|||
|
||||
3. Your code will be rejected if it cannot be compiled with the minimal
|
||||
supported version of Rust. This version is listed as
|
||||
`rust-version` in [`Cargo.toml`](../Cargo.toml); it is 1.61 as of this
|
||||
`rust-version` in [`Cargo.toml`](../Cargo.toml); it is 1.64 as of this
|
||||
writing.
|
||||
|
||||
4. Your code needs to pass `cargo clippy`. You can also
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
buildInputs = with pkgs; [
|
||||
# Using the minimal profile with explicit "clippy" extension to avoid
|
||||
# two versions of rustfmt
|
||||
(rust-bin.stable."1.61.0".minimal.override {
|
||||
(rust-bin.stable."1.64.0".minimal.override {
|
||||
extensions = [
|
||||
"rust-src" # for rust-analyzer
|
||||
"clippy"
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "jujutsu-lib"
|
|||
version = "0.7.0"
|
||||
authors = ["Martin von Zweigbergk <martinvonz@google.com>"]
|
||||
edition = "2021"
|
||||
rust-version = "1.61"
|
||||
rust-version = "1.64"
|
||||
license = "Apache-2.0"
|
||||
description = "Library for Jujutsu (an experimental VCS)"
|
||||
homepage = "https://github.com/martinvonz/jj"
|
||||
|
|
|
@ -1205,7 +1205,7 @@ fn internalize_filter(expression: &Rc<RevsetExpression>) -> Option<Rc<RevsetExpr
|
|||
expression: &RevsetExpression,
|
||||
) -> Option<(&Rc<RevsetExpression>, &Rc<RevsetExpression>)> {
|
||||
if let RevsetExpression::Intersection(expression1, expression2) = expression {
|
||||
is_filter(expression2).then(|| (expression1, expression2))
|
||||
is_filter(expression2).then_some((expression1, expression2))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -795,7 +795,7 @@ impl WorkspaceCommandHelper {
|
|||
.iter()
|
||||
.map(|c| self.format_commit_summary(c))
|
||||
.join("\n"),
|
||||
ellipsis = elided.then(|| "\n...").unwrap_or_default()
|
||||
ellipsis = elided.then_some("\n...").unwrap_or_default()
|
||||
);
|
||||
Err(user_error_with_hint(
|
||||
format!(r#"Revset "{revision_str}" resolved to more than one revision"#),
|
||||
|
|
|
@ -302,7 +302,7 @@ fn cmd_git_fetch(
|
|||
tx.mut_repo(),
|
||||
&git_repo,
|
||||
&remote,
|
||||
(!branches.is_empty()).then(|| &*branches),
|
||||
(!branches.is_empty()).then_some(&*branches),
|
||||
cb,
|
||||
&command.settings().git_settings(),
|
||||
)
|
||||
|
|
|
@ -98,7 +98,7 @@ fn diff_formats_from_args(args: &DiffFormatArgs) -> Vec<DiffFormat> {
|
|||
(args.color_words, DiffFormat::ColorWords),
|
||||
]
|
||||
.into_iter()
|
||||
.filter_map(|(arg, format)| arg.then(|| format))
|
||||
.filter_map(|(arg, format)| arg.then_some(format))
|
||||
.collect()
|
||||
}
|
||||
|
||||
|
|
18
src/ui.rs
18
src/ui.rs
|
@ -36,19 +36,14 @@ fn progress_indicator_setting(config: &config::Config) -> bool {
|
|||
config.get_bool("ui.progress-indicator").unwrap_or(true)
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
|
||||
pub enum ColorChoice {
|
||||
Always,
|
||||
Never,
|
||||
#[default]
|
||||
Auto,
|
||||
}
|
||||
|
||||
impl Default for ColorChoice {
|
||||
fn default() -> Self {
|
||||
ColorChoice::Auto
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for ColorChoice {
|
||||
type Err = &'static str;
|
||||
|
||||
|
@ -89,18 +84,13 @@ fn use_color(choice: ColorChoice) -> bool {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
|
||||
pub enum PaginationChoice {
|
||||
No,
|
||||
#[default]
|
||||
Auto,
|
||||
}
|
||||
|
||||
impl Default for PaginationChoice {
|
||||
fn default() -> Self {
|
||||
PaginationChoice::Auto
|
||||
}
|
||||
}
|
||||
|
||||
fn pager_setting(config: &config::Config) -> CommandNameAndArgs {
|
||||
config
|
||||
.get("ui.pager")
|
||||
|
|
Loading…
Reference in a new issue