Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
dskloetd committed Jun 21, 2024
1 parent dab0fa6 commit 94bbee2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
14 changes: 11 additions & 3 deletions rs/proposals/src/canisters/nns_registry/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,10 @@ impl Service {
pub async fn create_subnet(&self, arg0: CreateSubnetPayload) -> CallResult<()> {
ic_cdk::call(self.0, "create_subnet", (arg0,)).await
}
pub async fn deploy_guestos_to_all_subnet_nodes(&self, arg0: DeployGuestosToAllSubnetNodesPayload) -> CallResult<()> {
pub async fn deploy_guestos_to_all_subnet_nodes(
&self,
arg0: DeployGuestosToAllSubnetNodesPayload,
) -> CallResult<()> {
ic_cdk::call(self.0, "deploy_guestos_to_all_subnet_nodes", (arg0,)).await
}
pub async fn deploy_guestos_to_all_unassigned_nodes(
Expand All @@ -467,7 +470,9 @@ impl Service {
) -> CallResult<(GetNodeOperatorsAndDcsOfNodeProviderResponse,)> {
ic_cdk::call(self.0, "get_node_operators_and_dcs_of_node_provider", (arg0,)).await
}
pub async fn get_node_providers_monthly_xdr_rewards(&self) -> CallResult<(GetNodeProvidersMonthlyXdrRewardsResponse,)> {
pub async fn get_node_providers_monthly_xdr_rewards(
&self,
) -> CallResult<(GetNodeProvidersMonthlyXdrRewardsResponse,)> {
ic_cdk::call(self.0, "get_node_providers_monthly_xdr_rewards", ()).await
}
pub async fn get_subnet_for_canister(
Expand Down Expand Up @@ -512,7 +517,10 @@ impl Service {
pub async fn set_firewall_config(&self, arg0: SetFirewallConfigPayload) -> CallResult<()> {
ic_cdk::call(self.0, "set_firewall_config", (arg0,)).await
}
pub async fn update_api_boundary_nodes_version(&self, arg0: UpdateApiBoundaryNodesVersionPayload) -> CallResult<()> {
pub async fn update_api_boundary_nodes_version(
&self,
arg0: UpdateApiBoundaryNodesVersionPayload,
) -> CallResult<()> {
ic_cdk::call(self.0, "update_api_boundary_nodes_version", (arg0,)).await
}
pub async fn update_elected_hostos_versions(&self, arg0: UpdateElectedHostosVersionsPayload) -> CallResult<()> {
Expand Down
3 changes: 2 additions & 1 deletion scripts/did2rs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ cd "$GIT_ROOT"
# Replace invalid "{}" in generated Rust code with "EmptyRecord":
/^pub (struct|enum) /,/^}/{s/ *\{\},$/(EmptyRecord),/g};
' |
"$sed" -z 's/candid::define_function!(pub \([^ ]*\) [^;]*;\n#\[derive([^)]*)\]/pub type \1 = candid::Func;\n#[derive(CandidType, Deserialize)]/g'
"$sed" -z 's/candid::define_function!(pub \([^ ]*\) [^;]*;\n#\[derive([^)]*)\]/pub type \1 = candid::Func;\n#[derive(CandidType, Deserialize)]/g' |
rustfmt --edition 2021
} >"${RUST_PATH}"
if test -f "${EDIT_PATH}"; then
(
Expand Down

0 comments on commit 94bbee2

Please sign in to comment.