mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
parser: Fix warnings about clippy str_to_string
rule
This commit is contained in:
parent
edda6b8a1f
commit
f474bd77be
2 changed files with 3 additions and 3 deletions
|
@ -60,9 +60,9 @@ fn collect_tests(s: &str) -> Vec<Test> {
|
|||
for comment_block in sourcegen::CommentBlock::extract_untagged(s) {
|
||||
let first_line = &comment_block.contents[0];
|
||||
let (name, ok) = if let Some(name) = first_line.strip_prefix("test ") {
|
||||
(name.to_string(), true)
|
||||
(name.to_owned(), true)
|
||||
} else if let Some(name) = first_line.strip_prefix("test_err ") {
|
||||
(name.to_string(), false)
|
||||
(name.to_owned(), false)
|
||||
} else {
|
||||
continue;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue