about summary refs log tree commit diff
path: root/tvix/nix-compat/src
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-11-05T12·07+0200
committerflokli <flokli@flokli.de>2023-11-05T12·20+0000
commit65e5c31adff9430c19a631b994d519941d3a6c54 (patch)
tree0083fba7a1b51280e992c57cead0d62a16a6e495 /tvix/nix-compat/src
parentfb7e2a247ac9e0e8b24986b126d8aa98e40706c7 (diff)
refactor(tvix/nix-compat): use matches! macro r/6949
Flagged by ``#[warn(clippy::match_like_matches_macro)]`.`

Change-Id: If07109e5ec01b05df898119f9a577196dfe11b37
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9955
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/nix-compat/src')
-rw-r--r--tvix/nix-compat/src/store_path/mod.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/tvix/nix-compat/src/store_path/mod.rs b/tvix/nix-compat/src/store_path/mod.rs
index 8a1b3a595a09..c92db8e03733 100644
--- a/tvix/nix-compat/src/store_path/mod.rs
+++ b/tvix/nix-compat/src/store_path/mod.rs
@@ -222,11 +222,7 @@ static NAME_CHARS: [bool; 256] = {
     let mut c = 0;
 
     loop {
-        tbl[c as usize] = match c {
-            b'a'..=b'z' | b'A'..=b'Z' | b'0'..=b'9' => true,
-            b'+' | b'-' | b'_' | b'?' | b'=' | b'.' => true,
-            _ => false,
-        };
+        tbl[c as usize] = matches!(c, b'a'..=b'z' | b'A'..=b'Z' | b'0'..=b'9' | b'+' | b'-' | b'_' | b'?' | b'=' | b'.');
 
         if c == u8::MAX {
             break;