chore: builtins implement Copy
This commit is contained in:
parent
1ecd47a361
commit
349364d867
|
@ -3,7 +3,7 @@ use strum_macros::EnumString;
|
||||||
|
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
#[derive(Debug, Clone, EnumString, PartialEq)]
|
#[derive(Debug, Clone, EnumString, PartialEq, Copy)]
|
||||||
#[strum(serialize_all = "camelCase")]
|
#[strum(serialize_all = "camelCase")]
|
||||||
pub enum DefaultFunction {
|
pub enum DefaultFunction {
|
||||||
// Integer functions
|
// Integer functions
|
||||||
|
|
|
@ -301,7 +301,7 @@ impl<'b> Binder<'b> for DeBruijn {
|
||||||
|
|
||||||
impl Encode for DefaultFunction {
|
impl Encode for DefaultFunction {
|
||||||
fn encode(&self, e: &mut Encoder) -> Result<(), en::Error> {
|
fn encode(&self, e: &mut Encoder) -> Result<(), en::Error> {
|
||||||
e.bits(BUILTIN_TAG_WIDTH as i64, self.clone() as u8);
|
e.bits(BUILTIN_TAG_WIDTH as i64, *self as u8);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue