document hide_secret

This commit is contained in:
Louis Dureuil
2025-11-04 17:03:12 +01:00
committed by GitHub
parent e9c5df7993
commit 8618a4d2ba

View File

@@ -351,6 +351,7 @@ impl<T> Settings<T> {
}
}
/// Redact a secret string, starting from the `secret_offset`th byte.
pub fn hide_secret(secret: &mut String, secret_offset: usize) {
match secret.len().checked_sub(secret_offset) {
None => (),