about summary refs log tree commit diff
path: root/tvix/eval/src/systems.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-12-20T14·22+0300
committerclbot <clbot@tvl.fyi>2022-12-25T18·25+0000
commit71174f6626cbf100a8428ddc334681e4edfb45e6 (patch)
tree1e803137d755001700f0e900aa5173bbf43fdf3f /tvix/eval/src/systems.rs
parent67d508f2ece710714ce8abf6f7deba1fd2440487 (diff)
fix(tvix/eval): fix current clippy warnings r/5486
It's been a while since the last time, so quite a lot of stuff has
accumulated here.

Change-Id: I0762827c197b30a917ff470fd8ae8f220f6ba247
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7597
Reviewed-by: grfn <grfn@gws.fyi>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/systems.rs')
-rw-r--r--tvix/eval/src/systems.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/tvix/eval/src/systems.rs b/tvix/eval/src/systems.rs
index cfdbe2eed5..16386cb9e0 100644
--- a/tvix/eval/src/systems.rs
+++ b/tvix/eval/src/systems.rs
@@ -1,10 +1,7 @@
 /// true iff the argument is recognized by cppnix as the second
 /// coordinate of a "nix double"
 fn is_second_coordinate(x: &str) -> bool {
-    match x {
-        "linux" | "darwin" | "netbsd" | "openbsd" | "freebsd" => true,
-        _ => false,
-    }
+    matches!(x, "linux" | "darwin" | "netbsd" | "openbsd" | "freebsd")
 }
 
 /// This function takes an llvm triple (which may have three or four
@@ -16,7 +13,7 @@ pub fn llvm_triple_to_nix_double(llvm_triple: &str) -> String {
     let cpu = match parts[0] {
         "armv6" => "armv6l", // cppnix appends an "l" to armv6
         "armv7" => "armv7l", // cppnix appends an "l" to armv7
-        x => match x.as_bytes().as_ref() {
+        x => match x.as_bytes() {
             [b'i', _, b'8', b'6'] => "i686", // cppnix glob-matches against i*86
             _ => x,
         },