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
+2 -1
View File
@@ -42,7 +42,8 @@ impl ApConfigEntry {
}
// if name is given, calculate sha256 digest for this name
// test for the hash calculated here can be done with openssl:
// echo -n "Hello" >in.bin; openssl dgst -sha256 -binary -out out.bin in.bin; hexdump -C out.bin
// echo -n "Hello" >in.bin; openssl dgst -sha256 -binary -out out.bin in.bin; hexdump -C
// out.bin
if self.name.is_empty() {
return Ok(());
}