Skip to content

Commit

Permalink
chore(backend): Remove unnecessary serde_as usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa-tomic committed Jul 24, 2023
1 parent e7500d2 commit 1a7e81b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion rs/ic-management-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ actix-web = { version = "4.2.1", default-features = false, features = [
ic-base-types = { git = "https://github.com/dfinity/ic.git", rev = "794fc5b9341fa8f6a0e8f219201c35f0b5727ab9" }
ic-registry-keys = { git = "https://github.com/dfinity/ic.git", rev = "794fc5b9341fa8f6a0e8f219201c35f0b5727ab9" }
anyhow = "1.0.43"
serde_with = "3.0.0"
futures = "0.3.16"
serde_yaml = "0.9.11"
reqwest = { version = "0.11.4", features = ["json"] }
Expand Down
1 change: 0 additions & 1 deletion rs/ic-management-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ itertools = "0.10.3"
reqwest = { version = "0.11.9", features = ["json"] }
serde = "1.0.127"
serde_json = "1.0.66"
serde_with = "2.0.1"
strum = "0.24.1"
strum_macros = "0.24.3"
url = "2.2.2"
Expand Down
9 changes: 0 additions & 9 deletions rs/ic-management-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use registry_canister::mutations::do_remove_nodes_from_subnet::RemoveNodesFromSu
use registry_canister::mutations::do_update_subnet_replica::UpdateSubnetReplicaVersionPayload;
use registry_canister::mutations::node_management::do_remove_nodes::RemoveNodesPayload;
use serde::{Deserialize, Serialize};
use serde_with::{serde_as, DisplayFromStr};
use std::cmp::{Eq, Ord, PartialEq, PartialOrd};
use std::collections::BTreeMap;
use std::convert::TryFrom;
Expand Down Expand Up @@ -139,10 +138,8 @@ impl<T: TopologyChangePayload> From<(ProposalInfo, T)> for TopologyChangeProposa
}
}

#[serde_as]
#[derive(Clone, Serialize, Deserialize)]
pub struct Subnet {
#[serde_as(as = "DisplayFromStr")]
pub principal: PrincipalId,
pub nodes: Vec<Node>,
pub subnet_type: SubnetType,
Expand All @@ -165,10 +162,8 @@ pub struct SubnetMetadata {
pub applications: Option<Vec<Application>>,
}

#[serde_as]
#[derive(Clone, Serialize, Debug, Deserialize)]
pub struct Node {
#[serde_as(as = "DisplayFromStr")]
pub principal: PrincipalId,
pub ip_addr: Ipv6Addr,
pub operator: Operator,
Expand Down Expand Up @@ -258,10 +253,8 @@ pub struct CreateSubnetProposalInfo {
pub nodes: Vec<PrincipalId>,
}

#[serde_as]
#[derive(Clone, Serialize, Default, Debug, Deserialize)]
pub struct Operator {
#[serde_as(as = "DisplayFromStr")]
pub principal: PrincipalId,
pub provider: Provider,
pub allowance: u64,
Expand All @@ -270,10 +263,8 @@ pub struct Operator {
pub datacenter: Option<Datacenter>,
}

#[serde_as]
#[derive(Clone, Serialize, Default, Debug, Deserialize)]
pub struct Provider {
#[serde_as(as = "DisplayFromStr")]
pub principal: PrincipalId,
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
Expand Down

0 comments on commit 1a7e81b

Please sign in to comment.