Fix, reference by value for Language as everywhere
This commit is contained in:
parent
759af6d0a4
commit
a08c61235d
2 changed files with 2 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ fn test_lookahead_iterator() {
|
|||
lookahead.reset_state(next_state);
|
||||
assert!(lookahead.iter_names().eq(expected_symbols));
|
||||
|
||||
lookahead.reset(&language, next_state);
|
||||
lookahead.reset(language, next_state);
|
||||
assert!(lookahead
|
||||
.map(|s| language.node_kind_for_id(s).unwrap())
|
||||
.eq(expected_symbols));
|
||||
|
|
|
|||
|
|
@ -1524,7 +1524,7 @@ impl LookaheadIterator {
|
|||
/// This returns `true` if the language was set successfully and `false`
|
||||
/// otherwise.
|
||||
#[doc(alias = "ts_lookahead_iterator_reset")]
|
||||
pub fn reset(&self, language: &Language, state: u16) -> bool {
|
||||
pub fn reset(&self, language: Language, state: u16) -> bool {
|
||||
unsafe { ffi::ts_lookahead_iterator_reset(self.0.as_ptr(), language.0, state) }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue