Derive Hash for Language
Given Language implements Eq, it can probably implement Hash too. This makes it easy to derive a random identifier from a `Language`
This commit is contained in:
parent
5766b8a0a7
commit
3964651fc6
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ pub const PARSER_HEADER: &'static str = include_str!("../include/tree_sitter/par
|
|||
/// An opaque object that defines how to parse a particular language. The code for each
|
||||
/// `Language` is generated by the Tree-sitter CLI.
|
||||
#[doc(alias = "TSLanguage")]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
#[repr(transparent)]
|
||||
pub struct Language(*const ffi::TSLanguage);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue