Skip to content

Commit

Permalink
feat: implement Clone trait for ModuleAbi
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoks committed May 17, 2024
1 parent 3e8b484 commit f5a0855
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions move-vm-backend-common/src/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};

#[derive(
Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
Clone, Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
)]
/// Move module ABI.
pub struct ModuleAbi {
Expand All @@ -31,7 +31,7 @@ pub struct ModuleAbi {
}

#[derive(
Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
Clone, Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
)]
/// Move struct definition.
pub struct Struct {
Expand All @@ -46,7 +46,7 @@ pub struct Struct {
}

#[derive(
Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
Clone, Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
)]
/// Represntation for a struct element.
pub struct Field {
Expand All @@ -57,7 +57,7 @@ pub struct Field {
}

#[derive(
Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
Clone, Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
)]
/// Generic type abilities.
pub struct TypeAbilities {
Expand All @@ -82,7 +82,7 @@ impl From<&AbilitySet> for TypeAbilities {
}

#[derive(
Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
Clone, Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
)]
/// Move type abilities.
pub enum TypeAbility {
Expand All @@ -93,7 +93,7 @@ pub enum TypeAbility {
}

#[derive(
Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
Clone, Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
)]
/// Move type.
pub enum Type {
Expand All @@ -114,7 +114,7 @@ pub enum Type {
}

#[derive(
Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
Clone, Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
)]
// TODO: Can we merge this one with the main struct definition.
/// Simple struct definition for type.
Expand All @@ -128,7 +128,7 @@ pub struct StructDef {
}

#[derive(
Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
Clone, Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
)]
/// Move function.
pub struct Function {
Expand All @@ -145,7 +145,7 @@ pub struct Function {
}

#[derive(
Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
Clone, Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
)]
/// Function visibility.
// Private not needed since it's not accessible to outer modules.
Expand All @@ -168,7 +168,7 @@ impl From<&Visibility> for FunctionVisibility {
}

#[derive(
Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
Clone, Debug, Serialize, Deserialize, Ord, PartialOrd, Eq, PartialEq, TypeInfo, Decode, Encode,
)]
/// Friend module.
pub struct Friend {
Expand Down

0 comments on commit f5a0855

Please sign in to comment.