docs(diamond_creation): improve code example clarity

This commit is contained in:
Michele Sessa 2022-10-06 15:51:58 +01:00 committed by Michele
parent 47001cd118
commit 43c2a6dedc
1 changed files with 8 additions and 0 deletions

View File

@ -33,6 +33,9 @@ use diamond_creation::*;
fn main() {
println!("{:?}", get_diamond('A'));
println!("{:?}", get_diamond('C'));
for line in get_diamond('C') {
println!("{}", line);
}
}
```
@ -42,6 +45,11 @@ And its output:
$ cargo run
["A"]
[" A ", " B B ", "C C", " B B ", " A "]
A
B B
C C
B B
A
$
```