text-edit: Fix warnings about clippy str_to_string rule

This commit is contained in:
Tetsuharu Ohzeki 2024-02-10 01:00:17 +09:00
parent a897566515
commit 88f088c4a0

View File

@ -231,11 +231,11 @@ fn range(start: u32, end: u32) -> TextRange {
#[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);