Skip to content

Commit f474bd7

Browse files
parser: Fix warnings about clippy str_to_string rule
1 parent edda6b8 commit f474bd7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/parser/src/lexed_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl<'a> Converter<'a> {
149149

150150
if let Some(err) = err {
151151
let token = self.res.len() as u32;
152-
let msg = err.to_string();
152+
let msg = err.to_owned();
153153
self.res.error.push(LexError { msg, token });
154154
}
155155
}

crates/parser/src/tests/sourcegen_inline_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ fn collect_tests(s: &str) -> Vec<Test> {
6060
for comment_block in sourcegen::CommentBlock::extract_untagged(s) {
6161
let first_line = &comment_block.contents[0];
6262
let (name, ok) = if let Some(name) = first_line.strip_prefix("test ") {
63-
(name.to_string(), true)
63+
(name.to_owned(), true)
6464
} else if let Some(name) = first_line.strip_prefix("test_err ") {
65-
(name.to_string(), false)
65+
(name.to_owned(), false)
6666
} else {
6767
continue;
6868
};

0 commit comments

Comments
 (0)