We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8740992 commit cb10defCopy full SHA for cb10def
1 file changed
crates/postgresql-cst-parser/src/tree_sitter.rs
@@ -47,7 +47,7 @@ impl Tree {
47
}
48
49
50
- pub fn root_node(&self) -> Node {
+ pub fn root_node(&self) -> Node<'_> {
51
Node {
52
input: &self.src,
53
range_map: Rc::clone(&self.range_map),
@@ -63,6 +63,14 @@ pub struct Node<'a> {
63
pub node_or_token: NodeOrToken<'a>,
64
65
66
+impl<'a> PartialEq for Node<'a> {
67
+ fn eq(&self, other: &Self) -> bool {
68
+ self.node_or_token == other.node_or_token
69
+ }
70
+}
71
+
72
+impl<'a> Eq for Node<'a> {}
73
74
#[derive(Debug, Clone)]
75
pub struct TreeCursor<'a> {
76
pub input: &'a str,
0 commit comments