Skip to content

Commit

Permalink
refactor(sns): Add Copy implementation to ic-nervous-system-agent S…
Browse files Browse the repository at this point in the history
…NS canister wrappers (#2378)

They are just wrappers for `Principald`s, which are `Copy`, and it's
more convenient not to have to write `.clone()`

[← Prevous PR](#2377) | [Next PR
→](#2321)
  • Loading branch information
anchpop authored Oct 31, 2024
1 parent 9d5779f commit ed6af77
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rs/nervous_system/agent/src/sns/governance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use ic_sns_governance::pb::v1::{
};
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Deserialize, Serialize)]
#[derive(Copy, Clone, Debug, Deserialize, Serialize)]
pub struct GovernanceCanister {
pub canister_id: PrincipalId,
}
Expand Down
2 changes: 1 addition & 1 deletion rs/nervous_system/agent/src/sns/index.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use ic_base_types::PrincipalId;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Deserialize, Serialize)]
#[derive(Copy, Clone, Debug, Deserialize, Serialize)]
pub struct IndexCanister {
pub canister_id: PrincipalId,
}
Expand Down
2 changes: 1 addition & 1 deletion rs/nervous_system/agent/src/sns/ledger.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use ic_base_types::PrincipalId;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Deserialize, Serialize)]
#[derive(Copy, Clone, Debug, Deserialize, Serialize)]
pub struct LedgerCanister {
pub canister_id: PrincipalId,
}
Expand Down
2 changes: 1 addition & 1 deletion rs/nervous_system/agent/src/sns/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};

use crate::CallCanisters;

#[derive(Clone, Debug, Deserialize, Serialize)]
#[derive(Copy, Clone, Debug, Deserialize, Serialize)]
pub struct RootCanister {
pub canister_id: PrincipalId,
}
Expand Down
2 changes: 1 addition & 1 deletion rs/nervous_system/agent/src/sns/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use thiserror::Error;

use crate::CallCanisters;

#[derive(Clone, Debug, Deserialize, Serialize)]
#[derive(Copy, Clone, Debug, Deserialize, Serialize)]
pub struct SwapCanister {
pub canister_id: PrincipalId,
}
Expand Down

0 comments on commit ed6af77

Please sign in to comment.