mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
text-edit: Fix warnings about clippy str_to_string
rule
This commit is contained in:
parent
a897566515
commit
88f088c4a0
1 changed files with 3 additions and 3 deletions
|
@ -231,11 +231,11 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_apply() {
|
||||
let mut text = "_11h1_2222_xx3333_4444_6666".to_string();
|
||||
let mut text = "_11h1_2222_xx3333_4444_6666".to_owned();
|
||||
let mut builder = TextEditBuilder::default();
|
||||
builder.replace(range(3, 4), "1".to_string());
|
||||
builder.replace(range(3, 4), "1".to_owned());
|
||||
builder.delete(range(11, 13));
|
||||
builder.insert(22.into(), "_5555".to_string());
|
||||
builder.insert(22.into(), "_5555".to_owned());
|
||||
|
||||
let text_edit = builder.finish();
|
||||
text_edit.apply(&mut text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue