1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-05 06:00:30 +02:00

Minor whitespace changes (#2595)

This commit is contained in:
Nicole L
2025-02-06 09:52:29 -08:00
committed by GitHub
parent e1ed6eaf47
commit 6a25d7be04
3 changed files with 11 additions and 1 deletions

View File

@ -6,6 +6,8 @@ minutes: 10
Like C and C++, Rust has support for custom structs:
<!-- dprint-ignore-start -->
```rust,editable
struct Person {
name: String,
@ -17,7 +19,10 @@ fn describe(person: &Person) {
}
fn main() {
let mut peter = Person { name: String::from("Peter"), age: 27 };
let mut peter = Person {
name: String::from("Peter"),
age: 27,
};
describe(&peter);
peter.age = 28;
@ -30,6 +35,8 @@ fn main() {
}
```
<!-- dprint-ignore-end -->
<details>
Key Points: