diff --git a/Cargo.lock b/Cargo.lock index 317e81a..9dcb541 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -50,6 +50,6 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" diff --git a/src/strings.rs b/src/strings.rs index 63915ee..d9d1c41 100644 --- a/src/strings.rs +++ b/src/strings.rs @@ -6,7 +6,8 @@ use crate::{Error, Result}; /// Encode a `&str` as a nul-terminated UTF-16 buffer. /// /// The buffer is allocated with its final capacity up front so no intermediate -/// heap copy of the data is left behind (relevant for the `zeroize` feature). +/// heap copy of the data is left behind (relevant when the result is wrapped in +/// a [`WideSecret`] that is zeroized on drop). /// The interior-NUL check runs on the `&str` before any allocation — a non-NUL /// char never encodes to a 0 UTF-16 unit, so it is equivalent to scanning the /// encoded buffer — which keeps the error path free of transient copies too.