1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-11-23 21:54:45 +02:00

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.
This commit is contained in:
Andrew Gallant
2025-09-07 15:07:45 -04:00
parent 3f565b58cc
commit a60e62d9ac
14 changed files with 16 additions and 16 deletions

View File

@@ -798,7 +798,7 @@ impl HiArgs {
attach_timestamps(haystacks, |md| md.created()).collect()
}
};
with_timestamps.sort_by(|(_, ref t1), (_, ref t2)| {
with_timestamps.sort_by(|(_, t1), (_, t2)| {
let ordering = match (*t1, *t2) {
// Both have metadata, do the obvious thing.
(Some(t1), Some(t2)) => t1.cmp(&t2),
@@ -1188,7 +1188,7 @@ fn types(low: &LowArgs) -> anyhow::Result<ignore::types::Types> {
let mut builder = ignore::types::TypesBuilder::new();
builder.add_defaults();
for tychange in low.type_changes.iter() {
match tychange {
match *tychange {
TypeChange::Clear { ref name } => {
builder.clear(name);
}