mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
use aliases
This commit is contained in:
parent
7ffc114dab
commit
dccaa5e45e
@ -53,12 +53,12 @@ impl<R: TreeRoot<RaTypes>> Hash for SyntaxNode<R> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SyntaxNode<OwnedRoot> {
|
impl SyntaxNode {
|
||||||
pub(crate) fn new(green: GreenNode, errors: Vec<SyntaxError>) -> SyntaxNode {
|
pub(crate) fn new(green: GreenNode, errors: Vec<SyntaxError>) -> SyntaxNode {
|
||||||
SyntaxNode(::rowan::SyntaxNode::new(green, errors))
|
SyntaxNode(::rowan::SyntaxNode::new(green, errors))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl<'a> SyntaxNode<RefRoot<'a>> {
|
impl<'a> SyntaxNodeRef<'a> {
|
||||||
pub fn leaf_text(self) -> Option<&'a SmolStr> {
|
pub fn leaf_text(self) -> Option<&'a SmolStr> {
|
||||||
self.0.leaf_text()
|
self.0.leaf_text()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user