Rust: Re-apply suggested changes (I accidentally force-pushed them away).

This commit is contained in:
Geoffrey White
2025-01-24 17:30:06 +00:00
parent 117db8a9b2
commit 0a3d44c44e
2 changed files with 3 additions and 3 deletions

View File

@@ -5,7 +5,7 @@
<overview>
<p>
Sensitive user data and system information that is logged could be seen by an attacker when it is
Sensitive user data and system information that is logged could be exposed to an attacker when it is
displayed. Also, external processes often store the standard output and standard error streams of
an application, which will include logged sensitive information.
</p>
@@ -23,7 +23,7 @@ The following example code logs user credentials (in this case, their password)
</p>
<sample src="CleartextLoggingBad.rs"/>
<p>
Instead, you should encrypt the credentials, or better still omit them entirely:
Instead, you should encrypt the credentials, or better still, omit them entirely:
</p>
<sample src="CleartextLoggingGood.rs"/>
</example>

View File

@@ -6,7 +6,7 @@ use std::fmt::Write as _;
// --- tests ---
fn get_password() -> String {
return "123456".to_string();
"123456".to_string()
}
fn use_password(password: &String) {