binding(rust): Mark set_cancellation_flag self as mutable

This commit is contained in:
Andrew Hlynskyi 2021-09-20 17:58:43 +03:00
parent a63c09375f
commit d973527964

View file

@ -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(),