aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-10-30 17:39:18 +0000
committerGitHub <[email protected]>2019-10-30 17:39:18 +0000
commiteee55d4663084a01ce80f5ee201d8e1e345417cd (patch)
tree7fc1497065d00cfba1cd00523ed9545886745da1 /crates/ra_syntax/src/ast
parentd929f9c49bceb3b7c32ea45c5e55c42f168bbf34 (diff)
parentb441b4e8effeaf4532fd2e45c4d864480857c49e (diff)
Merge #2129
2129: Some clippy fixes r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r--crates/ra_syntax/src/ast/make.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs
index 76dad9155..3d5f18bfa 100644
--- a/crates/ra_syntax/src/ast/make.rs
+++ b/crates/ra_syntax/src/ast/make.rs
@@ -129,11 +129,11 @@ pub fn where_clause(preds: impl Iterator<Item = ast::WherePred>) -> ast::WhereCl
129} 129}
130 130
131pub fn if_expression(condition: &ast::Expr, statement: &str) -> ast::IfExpr { 131pub fn if_expression(condition: &ast::Expr, statement: &str) -> ast::IfExpr {
132 return ast_from_text(&format!( 132 ast_from_text(&format!(
133 "fn f() {{ if !{} {{\n {}\n}}\n}}", 133 "fn f() {{ if !{} {{\n {}\n}}\n}}",
134 condition.syntax().text(), 134 condition.syntax().text(),
135 statement 135 statement
136 )); 136 ))
137} 137}
138 138
139fn ast_from_text<N: AstNode>(text: &str) -> N { 139fn ast_from_text<N: AstNode>(text: &str) -> N {