mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
More manual clippy fixes
This commit is contained in:
parent
b8ddcb0652
commit
eceaf94f19
32 changed files with 141 additions and 159 deletions
|
@ -155,14 +155,11 @@ fn compile_error_expand(
|
|||
tt: &tt::Subtree,
|
||||
) -> Result<tt::Subtree, mbe::ExpandError> {
|
||||
if tt.count() == 1 {
|
||||
match &tt.token_trees[0] {
|
||||
tt::TokenTree::Leaf(tt::Leaf::Literal(it)) => {
|
||||
let s = it.text.as_str();
|
||||
if s.contains('"') {
|
||||
return Ok(quote! { loop { #it }});
|
||||
}
|
||||
if let tt::TokenTree::Leaf(tt::Leaf::Literal(it)) = &tt.token_trees[0] {
|
||||
let s = it.text.as_str();
|
||||
if s.contains('"') {
|
||||
return Ok(quote! { loop { #it }});
|
||||
}
|
||||
_ => {}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue