diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index 6ae0cec..3666f19 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_elm::language()).expect("Error loading elm grammar"); +//! parser.set_language(&tree_sitter_elm::language()).expect("Error loading elm grammar"); //! let tree = parser.parse(code, None).unwrap(); //! ``` //! @@ -46,7 +46,7 @@ mod tests { fn test_can_load_grammar() { let mut parser = tree_sitter::Parser::new(); parser - .set_language(super::language()) + .set_language(&super::language()) .expect("Error loading elm language"); } }