From 56e3fbe588597847b508969b7e3243725f5a792c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 6 Feb 2020 23:59:27 +0100 Subject: A tiny bit more consistent API --- crates/ra_syntax/src/ast/make.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs index 629503dc5..02966a3ff 100644 --- a/crates/ra_syntax/src/ast/make.rs +++ b/crates/ra_syntax/src/ast/make.rs @@ -158,7 +158,7 @@ pub fn where_clause(preds: impl IntoIterator) -> ast::Whe } } -pub fn if_expression(condition: &ast::Expr, statement: &str) -> ast::IfExpr { +pub fn if_expression(condition: ast::Expr, statement: &str) -> ast::IfExpr { ast_from_text(&format!( "fn f() {{ if !{} {{\n {}\n}}\n}}", condition.syntax().text(), -- cgit v1.2.3