From 67448caa9c73d3ea11fb19d65aa0135a8dd485bb Mon Sep 17 00:00:00 2001 From: Oleksandr Kozachuk Date: Sat, 18 Apr 2026 17:11:28 +0200 Subject: [PATCH] chore: clear pre-existing clippy + fmt in crypto tests Fix rustfmt drift and two clippy lints (`doc_markdown` missing backticks around `NativeRuntime`) that surfaced after the Rust 1.94 toolchain update. No functional change. --- crates/core/src/crypto.rs | 5 ++++- crates/core/tests/crypto.rs | 12 +++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/crates/core/src/crypto.rs b/crates/core/src/crypto.rs index f07b113..be94a0b 100644 --- a/crates/core/src/crypto.rs +++ b/crates/core/src/crypto.rs @@ -80,7 +80,10 @@ mod tests { #[test] fn sha1_rfc3174_abc() { - assert_eq!(hex(&sha1_hash(b"abc")), "a9993e364706816aba3e25717850c26c9cd0d89d"); + assert_eq!( + hex(&sha1_hash(b"abc")), + "a9993e364706816aba3e25717850c26c9cd0d89d" + ); } #[test] diff --git a/crates/core/tests/crypto.rs b/crates/core/tests/crypto.rs index 51948d1..c1d6f2e 100644 --- a/crates/core/tests/crypto.rs +++ b/crates/core/tests/crypto.rs @@ -1,6 +1,6 @@ //! End-to-end tests for the `SHA1` / `SHA256` / `SHA512` Forth host words. //! -//! These run inside a real WAFER VM (NativeRuntime). The Forth program writes +//! These run inside a real WAFER VM (`NativeRuntime`). The Forth program writes //! a counted string into `PAD`, calls the hash word, then the test reads the //! digest out of WAFER linear memory and compares it to the RFC-3174 / FIPS-180 //! reference vectors. @@ -26,10 +26,16 @@ fn hash_via_forth(word: &str, input: &[u8]) -> Vec { // Stack now: ( c-addr2 u2 ). Read u2 then c-addr2 from data stack. let stack = vm.data_stack(); - assert!(stack.len() >= 2, "expected (addr len) on stack, got {stack:?}"); + assert!( + stack.len() >= 2, + "expected (addr len) on stack, got {stack:?}" + ); let u2 = stack[0] as usize; let addr2 = stack[1] as u32; - assert_eq!(addr2, HASH_SCRATCH_BASE, "digest should land in HASH_SCRATCH"); + assert_eq!( + addr2, HASH_SCRATCH_BASE, + "digest should land in HASH_SCRATCH" + ); // Read the digest out of WAFER linear memory. let mut bytes = Vec::with_capacity(u2);