diff --git a/bindings/rust/README.md b/bindings/rust/README.md index 0795bba..8331664 100644 --- a/bindings/rust/README.md +++ b/bindings/rust/README.md @@ -17,6 +17,6 @@ let code = r#" ) "#; let mut parser = Parser::new(); -parser.set_language(tree_sitter_kotlin::language()).expect("Error loading Kotlin grammar"); +parser.set_language(&tree_sitter_kotlin::language()).expect("Error loading Kotlin grammar"); let parsed = parser.parse(code, None); ``` diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index d84e3a3..d519218 100644 --- a/bindings/rust/lib.rs +++ b/bindings/rust/lib.rs @@ -6,7 +6,7 @@ //! ``` //! let code = ""; //! let mut parser = tree_sitter::Parser::new(); -//! parser.set_language(tree_sitter_kotlin::language()).expect("Error loading kotlin grammar"); +//! parser.set_language(&tree_sitter_kotlin::language()).expect("Error loading kotlin grammar"); //! let tree = parser.parse(code, None).unwrap(); //! ``` //!