diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2017-01-23 16:40:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-23 16:40:46 -0500 |
| commit | 12b46292c672b7c0afd1c2c63559a61fdf01466c (patch) | |
| tree | 9962120fbdb993356ac1051a70010e3f354c2625 /src | |
| parent | 7bfe5c0281df677048decf41c46d28b872c19d7f (diff) | |
| parent | e7d60c00c68e72fa954bcff311bc92e1c445823c (diff) | |
| download | rust-12b46292c672b7c0afd1c2c63559a61fdf01466c.tar.gz rust-12b46292c672b7c0afd1c2c63559a61fdf01466c.zip | |
Rollup merge of #38794 - ConnyOnny:master, r=steveklabnik
book: match enum warning Matching enums with named fields in the previous way yielded the "non_shorthand_field_patterns" warning. The new code shows the shorthand syntax as well as field renaming, so it should be exhaustive ;-)
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/book/match.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/book/match.md b/src/doc/book/match.md index d01a20083ef..52d3c6ae926 100644 --- a/src/doc/book/match.md +++ b/src/doc/book/match.md @@ -82,7 +82,7 @@ fn process_message(msg: Message) { match msg { Message::Quit => quit(), Message::ChangeColor(r, g, b) => change_color(r, g, b), - Message::Move { x: x, y: y } => move_cursor(x, y), + Message::Move { x, y: new_name_for_y } => move_cursor(x, new_name_for_y), Message::Write(s) => println!("{}", s), }; } |
