diff --git a/Cargo.toml b/Cargo.toml index 16aed2f..ad58eca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ exclude = [ ] build = "build.rs" autotests = false -edition = "2021" +edition = "2024" rust-version = "1.88" [[bin]] diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index ed15ef3..4bd3e89 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/cli" readme = "README.md" keywords = ["regex", "grep", "cli", "utility", "util"] license = "Unlicense OR MIT" -edition = "2021" +edition = "2024" [dependencies] bstr = { version = "1.6.2", features = ["std"] } diff --git a/crates/core/flags/hiargs.rs b/crates/core/flags/hiargs.rs index ccb4cb3..7bf63e7 100644 --- a/crates/core/flags/hiargs.rs +++ b/crates/core/flags/hiargs.rs @@ -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 { 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); } diff --git a/crates/globset/Cargo.toml b/crates/globset/Cargo.toml index afcdb4d..a4e2223 100644 --- a/crates/globset/Cargo.toml +++ b/crates/globset/Cargo.toml @@ -13,7 +13,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/globset" readme = "README.md" keywords = ["regex", "glob", "multiple", "set", "pattern"] license = "Unlicense OR MIT" -edition = "2021" +edition = "2024" [lib] name = "globset" diff --git a/crates/grep/Cargo.toml b/crates/grep/Cargo.toml index 41c7ad8..a7c986c 100644 --- a/crates/grep/Cargo.toml +++ b/crates/grep/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/grep" readme = "README.md" keywords = ["regex", "grep", "egrep", "search", "pattern"] license = "Unlicense OR MIT" -edition = "2021" +edition = "2024" [dependencies] grep-cli = { version = "0.1.11", path = "../cli" } diff --git a/crates/ignore/Cargo.toml b/crates/ignore/Cargo.toml index e0ff47f..ad27ef7 100644 --- a/crates/ignore/Cargo.toml +++ b/crates/ignore/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/ignore" readme = "README.md" keywords = ["glob", "ignore", "gitignore", "pattern", "file"] license = "Unlicense OR MIT" -edition = "2021" +edition = "2024" [lib] name = "ignore" diff --git a/crates/matcher/Cargo.toml b/crates/matcher/Cargo.toml index 74186a4..9e8a9c8 100644 --- a/crates/matcher/Cargo.toml +++ b/crates/matcher/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" keywords = ["regex", "pattern", "trait"] license = "Unlicense OR MIT" autotests = false -edition = "2021" +edition = "2024" [dependencies] memchr = "2.6.3" diff --git a/crates/pcre2/Cargo.toml b/crates/pcre2/Cargo.toml index a5f6852..e509145 100644 --- a/crates/pcre2/Cargo.toml +++ b/crates/pcre2/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/pcre2" readme = "README.md" keywords = ["regex", "grep", "pcre", "backreference", "look"] license = "Unlicense OR MIT" -edition = "2018" +edition = "2024" [dependencies] grep-matcher = { version = "0.1.7", path = "../matcher" } diff --git a/crates/printer/Cargo.toml b/crates/printer/Cargo.toml index 141d309..07c12ed 100644 --- a/crates/printer/Cargo.toml +++ b/crates/printer/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/printer" readme = "README.md" keywords = ["grep", "pattern", "print", "printer", "sink"] license = "Unlicense OR MIT" -edition = "2021" +edition = "2024" [features] default = ["serde"] diff --git a/crates/printer/src/hyperlink/mod.rs b/crates/printer/src/hyperlink/mod.rs index e2b74fb..52862bf 100644 --- a/crates/printer/src/hyperlink/mod.rs +++ b/crates/printer/src/hyperlink/mod.rs @@ -482,7 +482,7 @@ impl FormatBuilder { let err_invalid_scheme = HyperlinkFormatError { kind: HyperlinkFormatErrorKind::InvalidScheme, }; - let Some(Part::Text(ref part)) = self.parts.first() else { + let Some(Part::Text(part)) = self.parts.first() else { return Err(err_invalid_scheme); }; let Some(colon) = part.find_byte(b':') else { @@ -538,7 +538,7 @@ impl Part { values: &Values, dest: &mut Vec, ) { - match self { + match *self { Part::Text(ref text) => dest.extend_from_slice(text), Part::Host => dest.extend_from_slice( env.host.as_ref().map(|s| s.as_bytes()).unwrap_or(b""), diff --git a/crates/regex/Cargo.toml b/crates/regex/Cargo.toml index 442fbd2..c0a4f35 100644 --- a/crates/regex/Cargo.toml +++ b/crates/regex/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/regex" readme = "README.md" keywords = ["regex", "grep", "search", "pattern", "line"] license = "Unlicense OR MIT" -edition = "2021" +edition = "2024" [dependencies] bstr = "1.6.2" diff --git a/crates/regex/src/ban.rs b/crates/regex/src/ban.rs index 1bd62e2..87991ab 100644 --- a/crates/regex/src/ban.rs +++ b/crates/regex/src/ban.rs @@ -9,7 +9,7 @@ pub(crate) fn check(expr: &Hir, byte: u8) -> Result<(), Error> { assert!(byte.is_ascii(), "ban byte must be ASCII"); let ch = char::from(byte); let invalid = || Err(Error::new(ErrorKind::Banned(byte))); - match expr.kind() { + match *expr.kind() { HirKind::Empty => {} HirKind::Literal(hir::Literal(ref lit)) => { if lit.iter().find(|&&b| b == byte).is_some() { diff --git a/crates/searcher/Cargo.toml b/crates/searcher/Cargo.toml index b6b0386..b84fb43 100644 --- a/crates/searcher/Cargo.toml +++ b/crates/searcher/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/searcher" readme = "README.md" keywords = ["regex", "grep", "egrep", "search", "pattern"] license = "Unlicense OR MIT" -edition = "2021" +edition = "2024" [dependencies] bstr = { version = "1.6.2", default-features = false, features = ["std"] } diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index ed71db5..0756263 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -2,7 +2,7 @@ name = "fuzz" version = "0.0.1" publish = false -edition = "2021" +edition = "2024" [package.metadata] cargo-fuzz = true