mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Some clippy fixes
This commit is contained in:
parent
5806195bc1
commit
b441b4e8ef
17 changed files with 23 additions and 29 deletions
|
@ -129,11 +129,11 @@ pub fn where_clause(preds: impl Iterator<Item = ast::WherePred>) -> ast::WhereCl
|
|||
}
|
||||
|
||||
pub fn if_expression(condition: &ast::Expr, statement: &str) -> ast::IfExpr {
|
||||
return ast_from_text(&format!(
|
||||
ast_from_text(&format!(
|
||||
"fn f() {{ if !{} {{\n {}\n}}\n}}",
|
||||
condition.syntax().text(),
|
||||
statement
|
||||
));
|
||||
))
|
||||
}
|
||||
|
||||
fn ast_from_text<N: AstNode>(text: &str) -> N {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue