mirror of https://github.com/01-edu/public.git
docs(diamond_creation): improve code example clarity
This commit is contained in:
parent
47001cd118
commit
43c2a6dedc
|
@ -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…
Reference in New Issue