Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/test-utils/src/lib.rs')
| -rw-r--r-- | crates/test-utils/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/test-utils/src/lib.rs b/crates/test-utils/src/lib.rs index 854b613ddf..b750107803 100644 --- a/crates/test-utils/src/lib.rs +++ b/crates/test-utils/src/lib.rs @@ -164,7 +164,7 @@ pub fn extract_tags(mut text: &str, tag: &str) -> (Vec<(TextRange, Option<String if text.starts_with(&open) { let close_open = text.find('>').unwrap(); let attr = text[open.len()..close_open].trim(); - let attr = if attr.is_empty() { None } else { Some(attr.to_string()) }; + let attr = if attr.is_empty() { None } else { Some(attr.to_owned()) }; text = &text[close_open + '>'.len_utf8()..]; let from = TextSize::of(&res); stack.push((from, attr)); @@ -326,7 +326,7 @@ fn extract_line_annotations(mut line: &str) -> Vec<LineAnnotation> { content = &content["file".len()..]; } - let content = content.trim_start().to_string(); + let content = content.trim_start().to_owned(); let annotation = if continuation { LineAnnotation::Continuation { offset: range.end(), content } |