rust: Improve code formatting

Do some formatting that are in experimental stage but improve the code
readability.

Use rustfmt with a nightly toolchain and enable:

format_code_in_doc_comments = true
reorder_impl_items = true
comment_width = 100
wrap_comments = true
normalize_comments = true

(see .rustfmt.toml)

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
Steffen Eiden
2024-05-24 13:18:52 +02:00
parent dea5f80215
commit 503e241db1
16 changed files with 78 additions and 71 deletions
+1 -1
View File
@@ -213,7 +213,7 @@ fn write_secret(secret: &AddSecretType, asrcb: &AddSecretRequest) -> Result<()>
.map(|c| if c.is_whitespace() { '_' } else { c })
.collect();
//write non confidential data (=name+id) to a yaml
// write non confidential data (=name+id) to a yaml
let secret_info = serde_yaml::to_string(asrcb.guest_secret())?;
if stdout.to_owned() {
println!("{secret_info}");