You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-26 18:51:00 +02:00
Added an Alternative way for printing struct and declaring a string. (#1773)
Knowing to_string method is good for learner to use at some situation. Knowing print complete struct object can be useful while debug. --------- Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
This commit is contained in:
committed by
GitHub
parent
a673efbc14
commit
faea6894e7
src
@ -53,4 +53,7 @@ later, but this is enough for subsequent slides and exercises to use strings.
|
||||
}
|
||||
```
|
||||
|
||||
- Using `{:?}` is a convenient way to print array/vector/struct of values for
|
||||
debugging purposes, and it's commonly used in code.
|
||||
|
||||
</details>
|
||||
|
Reference in New Issue
Block a user