Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement Clone trait for ModuleAbi #84

Merged
merged 1 commit into from
May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading