1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-06-14 22:15:13 +02:00

style: fix deprecations

Use `dyn` for trait objects and use `..=` for inclusive ranges.
This commit is contained in:
Andrew Gallant
2019-06-16 18:37:51 -04:00
parent 9f000c2910
commit 7b9972c308
6 changed files with 16 additions and 14 deletions

View File

@ -134,7 +134,7 @@ fn find_cap_ref(replacement: &[u8]) -> Option<CaptureRef> {
/// Returns true if and only if the given byte is allowed in a capture name.
fn is_valid_cap_letter(b: &u8) -> bool {
match *b {
b'0' ... b'9' | b'a' ... b'z' | b'A' ... b'Z' | b'_' => true,
b'0' ..= b'9' | b'a' ..= b'z' | b'A' ..= b'Z' | b'_' => true,
_ => false,
}
}