mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
A tiny bit more consistent API
This commit is contained in:
parent
a4431e8302
commit
56e3fbe588
2 changed files with 2 additions and 2 deletions
|
@ -158,7 +158,7 @@ pub fn where_clause(preds: impl IntoIterator<Item = ast::WherePred>) -> 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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue