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

@@ -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"

View File

@@ -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() {