1
0
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. ()

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:
Manichand Kondapaka
2024-02-03 02:18:03 +05:30
committed by GitHub
parent a673efbc14
commit faea6894e7
2 changed files with 8 additions and 0 deletions
src
std-types
types-and-values

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