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:
@@ -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"
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user