diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-07 15:00:07 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-07 15:00:07 +0000 |
commit | 6df91a84dc129b13dc58db510e68c5eb04297087 (patch) | |
tree | 277812e8a9562861925fad7bd7c91321bf79c4f7 /assets/logo-wide.svg | |
parent | 403ed489ff51e4b1d9b1bbde1ddb6f765ebcbd1f (diff) | |
parent | 44c76d6550081552c3c5106b0535a7e5bf265aec (diff) |
Merge #6731
6731: Add replace_match_with_if_let assist r=matklad a=Veykril
Basically the counterpart to `replace_if_let_with_match`, I personally sometimes want to replace matches like
```rust
match foo {
pat => expr,
_ => (),
}
```
into the corresponding
```rust
if let pat = foo {
expr
}
```
which is the main reasoning behind this.
I put this into the same file as `replace_if_let_with_match` because the are complementing each other and I would probably rename the file to something like `replace_if_let_match` but I didn't do that for now because I was unsure whether git would still view this as a rename or not due to the amount of changes in the file so that the diff is still properly visible for now.
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'assets/logo-wide.svg')
0 files changed, 0 insertions, 0 deletions