We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b60e3ef commit 171efb5Copy full SHA for 171efb5
src/patterns.md
@@ -309,15 +309,16 @@ let x = String::from("Hello");
309
let _ = x;
310
311
let y = (10, String::from("World"));
312
+// ignore a field from a tuple
313
let (a, _) = y;
314
315
println!("{} {}", x, y.1); //x and y.1 were NOT moved
316
# assert_eq!(a, 10);
317
-struct Person {
318
- name: String,
319
- age: u8,
320
-}
+# struct Person {
+# name: String,
+# age: u8,
321
+# }
322
let person = Person {
323
name: String::from("John"),
324
age: 23,
0 commit comments