From 7afd5a1a8bd14a6e783654d3f728d5cc81b6631d Mon Sep 17 00:00:00 2001 From: Andrew Hlynskyi Date: Thu, 13 Jul 2023 23:46:15 +0300 Subject: [PATCH] rust: remove Copy, Clone from opaque ptr data structs --- lib/binding_rust/bindings.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/binding_rust/bindings.rs b/lib/binding_rust/bindings.rs index a3de6a4a..76aeef57 100644 --- a/lib/binding_rust/bindings.rs +++ b/lib/binding_rust/bindings.rs @@ -3,27 +3,27 @@ pub type TSSymbol = u16; pub type TSFieldId = u16; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSLanguage { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSParser { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSTree { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSQuery { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSQueryCursor { _unused: [u8; 0], } @@ -49,7 +49,7 @@ pub struct TSRange { pub end_byte: u32, } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSInput { pub payload: *mut ::std::os::raw::c_void, pub read: ::std::option::Option< @@ -66,7 +66,7 @@ pub const TSLogType_TSLogTypeParse: TSLogType = 0; pub const TSLogType_TSLogTypeLex: TSLogType = 1; pub type TSLogType = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSLogger { pub payload: *mut ::std::os::raw::c_void, pub log: ::std::option::Option< @@ -102,7 +102,7 @@ pub struct TSTreeCursor { pub context: [u32; 2usize], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSQueryCapture { pub node: TSNode, pub index: u32, @@ -114,7 +114,7 @@ pub const TSQuantifier_TSQuantifierOne: TSQuantifier = 3; pub const TSQuantifier_TSQuantifierOneOrMore: TSQuantifier = 4; pub type TSQuantifier = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSQueryMatch { pub id: u32, pub pattern_index: u16, @@ -126,7 +126,7 @@ pub const TSQueryPredicateStepType_TSQueryPredicateStepTypeCapture: TSQueryPredi pub const TSQueryPredicateStepType_TSQueryPredicateStepTypeString: TSQueryPredicateStepType = 2; pub type TSQueryPredicateStepType = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSQueryPredicateStep { pub type_: TSQueryPredicateStepType, pub value_id: u32,