mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
reformat the world
This commit is contained in:
parent
5cb1d41a30
commit
12e3b4c70b
129 changed files with 727 additions and 2509 deletions
|
@ -8,9 +8,7 @@ pub fn arb_text() -> proptest::string::RegexGeneratorStrategy<String> {
|
|||
}
|
||||
|
||||
fn text_offsets(text: &str) -> Vec<TextUnit> {
|
||||
text.char_indices()
|
||||
.map(|(i, _)| TextUnit::from_usize(i))
|
||||
.collect()
|
||||
text.char_indices().map(|(i, _)| TextUnit::from_usize(i)).collect()
|
||||
}
|
||||
|
||||
pub fn arb_offset(text: &str) -> BoxedStrategy<TextUnit> {
|
||||
|
@ -56,9 +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