mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Fix clippy::match_ref_pats
This commit is contained in:
parent
dddcb0ad94
commit
b9af1d7c42
2 changed files with 9 additions and 9 deletions
|
@ -42,8 +42,8 @@ pub fn arb_text_edit(text: &str) -> BoxedStrategy<TextEdit> {
|
|||
.prop_flat_map(|cuts| {
|
||||
let strategies: Vec<_> = cuts
|
||||
.chunks(2)
|
||||
.map(|chunk| match chunk {
|
||||
&[from, to] => {
|
||||
.map(|chunk| match *chunk {
|
||||
[from, to] => {
|
||||
let range = TextRange::from_to(from, to);
|
||||
Just(AtomTextEdit::delete(range))
|
||||
.boxed()
|
||||
|
@ -54,7 +54,7 @@ pub fn arb_text_edit(text: &str) -> BoxedStrategy<TextEdit> {
|
|||
)
|
||||
.boxed()
|
||||
}
|
||||
&[x] => arb_text().prop_map(move |text| AtomTextEdit::insert(x, text)).boxed(),
|
||||
[x] => arb_text().prop_map(move |text| AtomTextEdit::insert(x, text)).boxed(),
|
||||
_ => unreachable!(),
|
||||
})
|
||||
.collect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue