From d973527964446b9b8187974a73d5cd418d09a880 Mon Sep 17 00:00:00 2001 From: Andrew Hlynskyi Date: Mon, 20 Sep 2021 17:58:43 +0300 Subject: [PATCH] binding(rust): Mark set_cancellation_flag self as mutable --- lib/binding_rust/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/binding_rust/lib.rs b/lib/binding_rust/lib.rs index 04dd78bf..068a6028 100644 --- a/lib/binding_rust/lib.rs +++ b/lib/binding_rust/lib.rs @@ -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(),