You've already forked comprehensive-rust
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:
@ -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:
|
||||
|
Reference in New Issue
Block a user