Merge branch 'master' into actions-ci

This commit is contained in:
Max Brunsfeld 2021-02-05 10:19:05 -08:00
commit 6dbe6a3a90
27 changed files with 932 additions and 460 deletions

View file

@ -1147,6 +1147,12 @@ impl<'a> TreeCursor<'a> {
}
}
impl<'a> Clone for TreeCursor<'a> {
fn clone(&self) -> Self {
TreeCursor(unsafe { ffi::ts_tree_cursor_copy(&self.0) }, PhantomData)
}
}
impl<'a> Drop for TreeCursor<'a> {
fn drop(&mut self) {
unsafe { ffi::ts_tree_cursor_delete(&mut self.0) }