Merge pull request #1397 from tree-sitter/fix/mark-set-cancellation-self-as-mutable
binding(rust): Mark set_cancellation_flag self as mutable
This commit is contained in:
commit
74152feef0
1 changed files with 1 additions and 1 deletions
|
|
@ -630,7 +630,7 @@ impl Parser {
|
|||
/// If a pointer is assigned, then the parser will periodically read from
|
||||
/// this pointer during parsing. If it reads a non-zero value, it will halt early,
|
||||
/// returning `None`. See [parse](Parser::parse) for more information.
|
||||
pub unsafe fn set_cancellation_flag(&self, flag: Option<&AtomicUsize>) {
|
||||
pub unsafe fn set_cancellation_flag(&mut self, flag: Option<&AtomicUsize>) {
|
||||
if let Some(flag) = flag {
|
||||
ffi::ts_parser_set_cancellation_flag(
|
||||
self.0.as_ptr(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue