feat(language): derive Clone and Copy on LanguageFn
Allows a LanguageFn to be passed around and create multiple languages since Language::new consumes a LanguageFn LanguageFn just wraps a function pointer, which already conforms to Copy so this is a simple addition.
This commit is contained in:
parent
f48c210dbd
commit
d60789afdc
1 changed files with 1 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#![no_std]
|
||||
/// LanguageFn wraps a C function that returns a pointer to a tree-sitter grammer.
|
||||
#[repr(transparent)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct LanguageFn(unsafe extern "C" fn() -> *const ());
|
||||
|
||||
impl LanguageFn {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue