mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 04:14:28 +00:00
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 ;-)
This commit is contained in:
commit
12b46292c6
@ -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),
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user