mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
sourcegen: Fix warnings about clippy str_to_string
rule
This commit is contained in:
parent
06f3995ca9
commit
0a879f7da4
1 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@ impl CommentBlock {
|
||||||
panic!("Use plain (non-doc) comments with tags like {tag}:\n {first}");
|
panic!("Use plain (non-doc) comments with tags like {tag}:\n {first}");
|
||||||
}
|
}
|
||||||
|
|
||||||
block.id = id.trim().to_string();
|
block.id = id.trim().to_owned();
|
||||||
true
|
true
|
||||||
});
|
});
|
||||||
blocks
|
blocks
|
||||||
|
@ -93,7 +93,7 @@ impl CommentBlock {
|
||||||
if let Some(' ') = contents.chars().next() {
|
if let Some(' ') = contents.chars().next() {
|
||||||
contents = &contents[1..];
|
contents = &contents[1..];
|
||||||
}
|
}
|
||||||
block.contents.push(contents.to_string());
|
block.contents.push(contents.to_owned());
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
if !block.contents.is_empty() {
|
if !block.contents.is_empty() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue