Browse Source

docs(diamond_creation): improve code example clarity

pull/1500/head
Michele Sessa 2 years ago committed by Michele
parent
commit
43c2a6dedc
  1. 8
      subjects/diamond_creation/README.md

8
subjects/diamond_creation/README.md

@ -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
$
```

Loading…
Cancel
Save