Skip to content

Commit

Permalink
Fix set_language for tree-sitter 0.21
Browse files Browse the repository at this point in the history
  • Loading branch information
314eter committed Mar 9, 2024
1 parent 1caf8c3 commit 1665fdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bindings/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ let code = r#"
"#;
let mut parser = Parser::new();
parser
.set_language(tree_sitter_ocaml::language_ocaml())
.set_language(&tree_sitter_ocaml::language_ocaml())
.expect("Error loading OCaml grammar");
let tree = parser.parse(code, None).unwrap();
```
Expand Down
4 changes: 2 additions & 2 deletions bindings/rust/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ mod tests {
fn test_ocaml() {
let mut parser = tree_sitter::Parser::new();
parser
.set_language(super::language_ocaml())
.set_language(&super::language_ocaml())
.expect("Error loading OCaml grammar");

let code = r#"
Expand All @@ -88,7 +88,7 @@ mod tests {
fn test_ocaml_interface() {
let mut parser = tree_sitter::Parser::new();
parser
.set_language(super::language_ocaml_interface())
.set_language(&super::language_ocaml_interface())
.expect("Error loading OCaml interface grammar");

let code = r#"
Expand Down

0 comments on commit 1665fdf

Please sign in to comment.