From 43ff62c0be1a98d079fa8b71237b1b8663b69456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Audiger?= Date: Sun, 29 Jun 2025 16:11:07 +0200 Subject: [PATCH 1/2] build: update Rust to 1.88 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémy Audiger --- Cargo.toml | 2 +- rust-toolchain.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4274ce0..d6fc729 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace.package] edition = "2024" -rust-version = "1.87" # To align with the rust-toolchain.toml +rust-version = "1.88" # To align with the rust-toolchain.toml [workspace] members = [ diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 94ec141..afe74e2 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.87" +channel = "1.88" profile = "default" targets = ["x86_64-unknown-linux-musl"] From 0df849e44f7afb6f68b22776d87ac9ddd5cb1033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Audiger?= Date: Sun, 29 Jun 2025 16:11:19 +0200 Subject: [PATCH 2/2] refactor: merge two consecutives if statements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémy Audiger --- crates/brioche-resources/src/lib.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/brioche-resources/src/lib.rs b/crates/brioche-resources/src/lib.rs index 2d983ff..1a7a688 100644 --- a/crates/brioche-resources/src/lib.rs +++ b/crates/brioche-resources/src/lib.rs @@ -17,19 +17,19 @@ pub fn find_resource_dirs( paths.push(PathBuf::from(pack_resource_dir)); } - if include_readonly { - if let Some(input_resource_dirs) = std::env::var_os("BRIOCHE_INPUT_RESOURCE_DIRS") { - if let Some(input_resource_dirs) = <[u8]>::from_os_str(&input_resource_dirs) { - for input_resource_dir in input_resource_dirs.split_str(b":") { - if let Ok(path) = input_resource_dir.to_path() { - paths.push(path.to_owned()); - } + if include_readonly + && let Some(input_resource_dirs) = std::env::var_os("BRIOCHE_INPUT_RESOURCE_DIRS") + { + if let Some(input_resource_dirs) = <[u8]>::from_os_str(&input_resource_dirs) { + for input_resource_dir in input_resource_dirs.split_str(b":") { + if let Ok(path) = input_resource_dir.to_path() { + paths.push(path.to_owned()); } } + } - for input_resource_dir in std::env::split_paths(&input_resource_dirs) { - paths.push(input_resource_dir); - } + for input_resource_dir in std::env::split_paths(&input_resource_dirs) { + paths.push(input_resource_dir); } }