We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b8b309 commit 9c13486Copy full SHA for 9c13486
secrecy/src/lib.rs
@@ -196,7 +196,8 @@ impl SecretBox<str> {
196
/// This works like [`String::from_utf8`], except that the buffer is truncated to the specified
197
/// length before the string is created. Note that the allocation is not resized; if the buffer
198
/// is much larger than the resulting string, this is wasteful, and it is probably better to
199
- /// call [`SecretString::from`] on the slice to make a new allocation with only the needed size.
+ /// call [`str::from_utf8`] on the slice to make a new allocation with only the needed size, and
200
+ /// then pass that to [`SecretString::from`].
201
pub fn from_utf8_box_len(
202
mut other: SecretBox<[u8]>,
203
len: usize,
0 commit comments