Skip to content

Commit a60e62d

Browse files
committed
rust: move to Rust 2024
I'd like to use let chains. Probably this isn't necessary to do for every crate, but I don't feel like maintaining a mismash.
1 parent 3f565b5 commit a60e62d

File tree

14 files changed

+16
-16
lines changed

14 files changed

+16
-16
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ exclude = [
2424
]
2525
build = "build.rs"
2626
autotests = false
27-
edition = "2021"
27+
edition = "2024"
2828
rust-version = "1.88"
2929

3030
[[bin]]

crates/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/cli"
1111
readme = "README.md"
1212
keywords = ["regex", "grep", "cli", "utility", "util"]
1313
license = "Unlicense OR MIT"
14-
edition = "2021"
14+
edition = "2024"
1515

1616
[dependencies]
1717
bstr = { version = "1.6.2", features = ["std"] }

crates/core/flags/hiargs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ impl HiArgs {
798798
attach_timestamps(haystacks, |md| md.created()).collect()
799799
}
800800
};
801-
with_timestamps.sort_by(|(_, ref t1), (_, ref t2)| {
801+
with_timestamps.sort_by(|(_, t1), (_, t2)| {
802802
let ordering = match (*t1, *t2) {
803803
// Both have metadata, do the obvious thing.
804804
(Some(t1), Some(t2)) => t1.cmp(&t2),
@@ -1188,7 +1188,7 @@ fn types(low: &LowArgs) -> anyhow::Result<ignore::types::Types> {
11881188
let mut builder = ignore::types::TypesBuilder::new();
11891189
builder.add_defaults();
11901190
for tychange in low.type_changes.iter() {
1191-
match tychange {
1191+
match *tychange {
11921192
TypeChange::Clear { ref name } => {
11931193
builder.clear(name);
11941194
}

crates/globset/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/globset"
1313
readme = "README.md"
1414
keywords = ["regex", "glob", "multiple", "set", "pattern"]
1515
license = "Unlicense OR MIT"
16-
edition = "2021"
16+
edition = "2024"
1717

1818
[lib]
1919
name = "globset"

crates/grep/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/grep"
1111
readme = "README.md"
1212
keywords = ["regex", "grep", "egrep", "search", "pattern"]
1313
license = "Unlicense OR MIT"
14-
edition = "2021"
14+
edition = "2024"
1515

1616
[dependencies]
1717
grep-cli = { version = "0.1.11", path = "../cli" }

crates/ignore/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/ignore"
1212
readme = "README.md"
1313
keywords = ["glob", "ignore", "gitignore", "pattern", "file"]
1414
license = "Unlicense OR MIT"
15-
edition = "2021"
15+
edition = "2024"
1616

1717
[lib]
1818
name = "ignore"

crates/matcher/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ readme = "README.md"
1212
keywords = ["regex", "pattern", "trait"]
1313
license = "Unlicense OR MIT"
1414
autotests = false
15-
edition = "2021"
15+
edition = "2024"
1616

1717
[dependencies]
1818
memchr = "2.6.3"

crates/pcre2/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/pcre2"
1111
readme = "README.md"
1212
keywords = ["regex", "grep", "pcre", "backreference", "look"]
1313
license = "Unlicense OR MIT"
14-
edition = "2018"
14+
edition = "2024"
1515

1616
[dependencies]
1717
grep-matcher = { version = "0.1.7", path = "../matcher" }

crates/printer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/printer"
1212
readme = "README.md"
1313
keywords = ["grep", "pattern", "print", "printer", "sink"]
1414
license = "Unlicense OR MIT"
15-
edition = "2021"
15+
edition = "2024"
1616

1717
[features]
1818
default = ["serde"]

crates/printer/src/hyperlink/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ impl FormatBuilder {
482482
let err_invalid_scheme = HyperlinkFormatError {
483483
kind: HyperlinkFormatErrorKind::InvalidScheme,
484484
};
485-
let Some(Part::Text(ref part)) = self.parts.first() else {
485+
let Some(Part::Text(part)) = self.parts.first() else {
486486
return Err(err_invalid_scheme);
487487
};
488488
let Some(colon) = part.find_byte(b':') else {
@@ -538,7 +538,7 @@ impl Part {
538538
values: &Values,
539539
dest: &mut Vec<u8>,
540540
) {
541-
match self {
541+
match *self {
542542
Part::Text(ref text) => dest.extend_from_slice(text),
543543
Part::Host => dest.extend_from_slice(
544544
env.host.as_ref().map(|s| s.as_bytes()).unwrap_or(b""),

0 commit comments

Comments
 (0)