diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-24 11:48:32 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-24 11:48:32 +0000 |
commit | 6ef64622afd818d7b091e36b8228bc8ebd52d2e1 (patch) | |
tree | cc93bacfd4b51fb2c60e4da01f5df34e87fc7eaf /docs | |
parent | 8617fe641ddc0d8c4303c5bbe49152ea320ef179 (diff) | |
parent | ff62ef19f7c29b033d49962bfebf4d4cf43694d5 (diff) |
Merge #3700
3700: fill match arms with empty block rather than unit tuple r=matklad a=JoshMcguigan
As requested by @Veetaha in #3689 and #3687, this modifies the fill match arms assist to create match arms as an empty block `{}` rather than a unit tuple `()`.
In one test I left one of the pre-existing match arms as a unit tuple, and added a body to another match arm, to demonstrate that the contents of existing match arms persist.
Co-authored-by: Josh Mcguigan <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/user/assists.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/user/assists.md b/docs/user/assists.md index e2850b4dd..f3ce6b0e0 100644 --- a/docs/user/assists.md +++ b/docs/user/assists.md | |||
@@ -267,8 +267,8 @@ enum Action { Move { distance: u32 }, Stop } | |||
267 | 267 | ||
268 | fn handle(action: Action) { | 268 | fn handle(action: Action) { |
269 | match action { | 269 | match action { |
270 | Action::Move { distance } => (), | 270 | Action::Move { distance } => {} |
271 | Action::Stop => (), | 271 | Action::Stop => {} |
272 | } | 272 | } |
273 | } | 273 | } |
274 | ``` | 274 | ``` |