Closed
Description
The second example for the bindings contains advanced syntax that the reader has not seen (at leat to the best of my knowledge when skipping "learn rust"). Those bits:
let mut x: Option<Person> = Some(Person { name: Some(name) });
match x {
Some(Person { name: ref a @ Some(_), .. }) => println!("{:?}", a),
_ => {}
}
This Some
business is new and the matching of the inner type far from obvious.
Even the format string "{:?}"
is not explained.
As an aside: There is no index that would find where Some
is actually covered in the book.
(Otherwise: Well done on the book!)
Metadata
Metadata
Assignees
Labels
No labels