mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Slightly more fluent API
This commit is contained in:
parent
8296d3208d
commit
c84010e246
2 changed files with 14 additions and 14 deletions
|
@ -22,7 +22,7 @@ impl ast::BinExpr {
|
|||
#[must_use]
|
||||
pub fn replace_op(&self, op: SyntaxKind) -> Option<ast::BinExpr> {
|
||||
let op_node: SyntaxElement = self.op_details()?.0.into();
|
||||
let to_insert: Option<SyntaxElement> = Some(tokens::op(op).into());
|
||||
let to_insert: Option<SyntaxElement> = Some(make::token(op).into());
|
||||
Some(replace_children(self, single_node(op_node), to_insert.into_iter()))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue