From 971f1aeaaaad42805611a3a0af459655131148fa Mon Sep 17 00:00:00 2001 From: JohnE Date: Wed, 11 Mar 2026 01:47:18 -0700 Subject: [PATCH] MOD: fixed warnings --- crates/ccc-crypto-wolfssl/build.rs | 6 +++--- README_all.rst => docs/README_all.rst | 0 tests/conformance/src/main.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename README_all.rst => docs/README_all.rst (100%) diff --git a/crates/ccc-crypto-wolfssl/build.rs b/crates/ccc-crypto-wolfssl/build.rs index f0f5371..1ceff80 100644 --- a/crates/ccc-crypto-wolfssl/build.rs +++ b/crates/ccc-crypto-wolfssl/build.rs @@ -14,7 +14,7 @@ //! a pre-installed wolfSSL at this path. The path must contain //! `include/wolfssl/` and `lib/libwolfssl.a`. -use std::{env, path::PathBuf}; +use std::{env, path::{Path, PathBuf}}; fn main() { // When the `stub_ffi` feature is enabled (e.g. for type-checking without @@ -86,7 +86,7 @@ fn main() { } /// Build wolfSSL from source using CMake. Returns `(include_dir, lib_dir)`. -fn build_wolfssl_cmake(source_dir: &PathBuf, _out_dir: &PathBuf) -> (PathBuf, PathBuf) { +fn build_wolfssl_cmake(source_dir: &Path, _out_dir: &Path) -> (PathBuf, PathBuf) { println!( "cargo:warning=Building wolfSSL from source at {}", source_dir.display() @@ -167,7 +167,7 @@ fn build_wolfssl_cmake(source_dir: &PathBuf, _out_dir: &PathBuf) -> (PathBuf, Pa } /// Run bindgen over the wolfCrypt headers we actually use. -fn generate_bindings(include_dir: &PathBuf, out_dir: &PathBuf) { +fn generate_bindings(include_dir: &Path, out_dir: &Path) { let header = include_dir.join("wolfssl/wolfcrypt/aes.h"); if !header.exists() { diff --git a/README_all.rst b/docs/README_all.rst similarity index 100% rename from README_all.rst rename to docs/README_all.rst diff --git a/tests/conformance/src/main.rs b/tests/conformance/src/main.rs index d20858e..ab77d06 100644 --- a/tests/conformance/src/main.rs +++ b/tests/conformance/src/main.rs @@ -311,8 +311,8 @@ static XCHACHA20_PROBES: &[XChaChaProbe] = &[ // ────────────────────────────────────────────────────────────────────────────── fn from_hex(s: &str) -> Vec { - let s = s.replace(' ', "").replace('\n', ""); - assert!(s.len() % 2 == 0, "odd-length hex: {s}"); + let s = s.replace([' ', '\n'], ""); + assert!(s.len().is_multiple_of(2), "odd-length hex: {s}"); (0..s.len()) .step_by(2) .map(|i| u8::from_str_radix(&s[i..i + 2], 16).unwrap())