From a87bcd2494d62c110ba9bbe4752948a4c9d2e0a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Fri, 16 Aug 2024 16:16:20 +0100 Subject: [PATCH] Fix typo in docstring: two => to Also, rephrase slightly. --- src/api.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/api.rs b/src/api.rs index bf85fa0..03b2cc2 100644 --- a/src/api.rs +++ b/src/api.rs @@ -101,9 +101,10 @@ impl SyntaxNode { pub fn new_root_mut(green: GreenNode) -> SyntaxNode { SyntaxNode::from(cursor::SyntaxNode::new_root_mut(green)) } + /// Returns a green tree, equal to the green tree this node - /// belongs two, except with this node substitute. The complexity - /// of operation is proportional to the depth of the tree + /// belongs to, except with this node substituted. The complexity + /// of the operation is proportional to the depth of the tree. pub fn replace_with(&self, replacement: GreenNode) -> GreenNode { self.raw.replace_with(replacement) } @@ -263,8 +264,8 @@ impl SyntaxNode { impl SyntaxToken { /// Returns a green tree, equal to the green tree this token - /// belongs two, except with this token substitute. The complexity - /// of operation is proportional to the depth of the tree + /// belongs to, except with this token substituted. The complexity + /// of the operation is proportional to the depth of the tree. pub fn replace_with(&self, new_token: GreenToken) -> GreenNode { self.raw.replace_with(new_token) }