From a54000b87ef28b67f631b983f19590d3180560d0 Mon Sep 17 00:00:00 2001 From: Tethys Svensson Date: Fri, 29 Nov 2024 08:57:25 +0100 Subject: [PATCH] Fix CI (#274) --- .../src/intermediate_language/translation.rs | 2 +- crates/planus/src/builder_cache.rs | 2 +- flake.lock | 24 +++++++++---------- test/rust/build.rs | 2 +- test/rust/src/test_template.rs | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/crates/planus-translation/src/intermediate_language/translation.rs b/crates/planus-translation/src/intermediate_language/translation.rs index 4d923514..489350dd 100644 --- a/crates/planus-translation/src/intermediate_language/translation.rs +++ b/crates/planus-translation/src/intermediate_language/translation.rs @@ -199,7 +199,7 @@ impl<'a> Translator<'a> { if self .reachability .get(¤t_file_id) - .map_or(false, |reachable| reachable.contains(&decl.file_id)) + .is_some_and(|reachable| reachable.contains(&decl.file_id)) { return Some(result); } else if seen_hints.insert((decl.file_id, decl.definition_span)) { diff --git a/crates/planus/src/builder_cache.rs b/crates/planus/src/builder_cache.rs index f1e3467c..473a49c0 100644 --- a/crates/planus/src/builder_cache.rs +++ b/crates/planus/src/builder_cache.rs @@ -101,7 +101,7 @@ impl Cache { self.cache .find(key_hash, |back_offset| { C::get_cache_key(serialized_data, *back_offset) - .map_or(false, |old_key| old_key == key) + .is_some_and(|old_key| old_key == key) }) .copied() } diff --git a/flake.lock b/flake.lock index a0a0333f..af3dd3f3 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "crane": { "locked": { - "lastModified": 1730060262, - "narHash": "sha256-RMgSVkZ9H03sxC+Vh4jxtLTCzSjPq18UWpiM0gq6shQ=", + "lastModified": 1732407143, + "narHash": "sha256-qJOGDT6PACoX+GbNH2PPx2ievlmtT1NVeTB80EkRLys=", "owner": "ipetkov", "repo": "crane", - "rev": "498d9f122c413ee1154e8131ace5a35a80d8fa76", + "rev": "f2b4b472983817021d9ffb60838b2b36b9376b20", "type": "github" }, "original": { @@ -20,11 +20,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -35,11 +35,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1730137625, - "narHash": "sha256-9z8oOgFZiaguj+bbi3k4QhAD6JabWrnv7fscC/mt0KE=", + "lastModified": 1732749044, + "narHash": "sha256-T38FQOg0BV5M8FN1712fovzNakSOENEYs+CSkg31C9Y=", "owner": "nixos", "repo": "nixpkgs", - "rev": "64b80bfb316b57cdb8919a9110ef63393d74382a", + "rev": "0c5b4ecbed5b155b705336aa96d878e55acd8685", "type": "github" }, "original": { @@ -64,11 +64,11 @@ ] }, "locked": { - "lastModified": 1730428392, - "narHash": "sha256-2aRfq1P0usr+TlW9LUCoefqqpPum873ac0TgZzXYHKI=", + "lastModified": 1732847586, + "narHash": "sha256-SnHHSBNZ+aj8mRzYxb6yXBl9ei3K3j5agC/D8Vjw/no=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "17eda17f5596a84e92ba94160139eb70f3c3e734", + "rev": "97210ddff72fe139815f4c1ac5da74b5b0dde2d7", "type": "github" }, "original": { diff --git a/test/rust/build.rs b/test/rust/build.rs index 9f0530f2..b469253c 100644 --- a/test/rust/build.rs +++ b/test/rust/build.rs @@ -58,7 +58,7 @@ fn generate_test_code( if !file_path.is_dir() && file_path .extension() - .map_or(false, |extension| extension == "fbs") + .is_some_and(|extension| extension == "fbs") { let file_stem = file_path.file_stem().unwrap().to_str().unwrap(); diff --git a/test/rust/src/test_template.rs b/test/rust/src/test_template.rs index 93c71210..b3bbe9ef 100644 --- a/test/rust/src/test_template.rs +++ b/test/rust/src/test_template.rs @@ -17,7 +17,7 @@ fn test_serialize() { if !file_path.is_dir() && file_path .extension() - .map_or(false, |extension| extension == "json") + .is_some_and(|extension| extension == "json") { let json = std::fs::read_to_string(&file_path).unwrap(); let root: Root = serde_json::from_str(&json).unwrap(); @@ -80,7 +80,7 @@ fn test_deserialize() { let file_path = entry.path(); if file_path .extension() - .map_or(false, |extension| extension == "bin") + .is_some_and(|extension| extension == "bin") { let data = std::fs::read(&file_path).unwrap();