From aad93fef84b7359b39b43db92f7afd68b5017e3f Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sat, 15 Mar 2025 17:13:11 +0000 Subject: [PATCH] Fix CI --- backend/rust-toolchain.toml | 4 ++++ backend/sync_lib/src/lib.rs | 2 +- frontend/test-client/run.sh | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 backend/rust-toolchain.toml diff --git a/backend/rust-toolchain.toml b/backend/rust-toolchain.toml new file mode 100644 index 00000000..46870171 --- /dev/null +++ b/backend/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "nightly-2025-03-14" +targets = [ "x86_64-unknown-linux-gnu" ] +profile = "default" diff --git a/backend/sync_lib/src/lib.rs b/backend/sync_lib/src/lib.rs index 16e01f24..e0fa5eb7 100644 --- a/backend/sync_lib/src/lib.rs +++ b/backend/sync_lib/src/lib.rs @@ -66,7 +66,7 @@ pub fn merge_text(parent: &str, left: &str, right: &str) -> String { pub fn is_binary(data: &[u8]) -> bool { set_panic_hook(); - if data.iter().any(|&b| b == 0) { + if data.contains(&0) { // Even though the NUL character is valid in UTF-8, it's highly suspicious in // human-readable text. return true; diff --git a/frontend/test-client/run.sh b/frontend/test-client/run.sh index 04bbba67..f559db2f 100755 --- a/frontend/test-client/run.sh +++ b/frontend/test-client/run.sh @@ -31,7 +31,7 @@ print_failed_log() { # Only consider non-zero exit codes as failures if [ $exit_code -ne 0 ]; then - echo "Process ${pids[$i-1]} failed with exit code $exit_code. Log file: $(pwd)/log_${i}.log" + echo "Process ${pids[$i-1]} failed with exit code $exit_code. Log file: $(pwd)/logs/log_${i}.log" return 0 else echo "Process ${pids[$i-1]} completed successfully with exit code 0"