Skip to content

Commit ccd6b3e

Browse files
BigtoCchipshort
authored andcommitted
chore(crate): Fix struct imports
1 parent 7b45e5a commit ccd6b3e

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

packages/std/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub use crate::math::{
8585
Int512, Int64, Isqrt, SignedDecimal, SignedDecimal256, SignedDecimal256RangeExceeded,
8686
SignedDecimalRangeExceeded, Uint128, Uint256, Uint512, Uint64,
8787
};
88-
pub use crate::metadata::{DenomMetadata, DenomUnit};
88+
pub use crate::metadata::{DenomMetadata, DenomUnit, NullableDenomMetadata, NullableDenomUnit};
8989
pub use crate::msgpack::{from_msgpack, to_msgpack_binary, to_msgpack_vec};
9090
pub use crate::never::Never;
9191
pub use crate::pagination::PageRequest;
@@ -96,8 +96,8 @@ pub use crate::query::{
9696
DelegationRewardsResponse, DelegationTotalRewardsResponse, DelegatorReward,
9797
DelegatorValidatorsResponse, DelegatorWithdrawAddressResponse, DenomMetadataResponse,
9898
DistributionQuery, FeeEnabledChannelResponse, FullDelegation, GrpcQuery, IbcQuery,
99-
ListChannelsResponse, PortIdResponse, QueryRequest, StakingQuery, SupplyResponse, Validator,
100-
ValidatorResponse, WasmQuery,
99+
ListChannelsResponse, NullableDenomMetadataResponse, PortIdResponse, QueryRequest,
100+
StakingQuery, SupplyResponse, Validator, ValidatorResponse, WasmQuery,
101101
};
102102
#[cfg(all(feature = "stargate", feature = "cosmwasm_1_2"))]
103103
pub use crate::results::WeightedVoteOption;

packages/std/src/query/bank.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ use serde::{Deserialize, Serialize};
44
use crate::Coin;
55

66
use super::query_response::QueryResponseType;
7-
use crate::metadata::NullableDenomMetadata;
87
use crate::prelude::*;
98
#[cfg(feature = "cosmwasm_1_3")]
109
use crate::PageRequest;
11-
use crate::{Binary, DenomMetadata};
10+
use crate::{Binary, DenomMetadata, NullableDenomMetadata};
1211

1312
#[non_exhaustive]
1413
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
@@ -83,6 +82,8 @@ pub struct DenomMetadataResponse {
8382
pub metadata: DenomMetadata,
8483
}
8584

85+
impl_response_constructor!(DenomMetadataResponse, metadata: DenomMetadata);
86+
8687
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
8788
#[serde(rename_all = "snake_case")]
8889
#[non_exhaustive]
@@ -91,7 +92,7 @@ pub struct NullableDenomMetadataResponse {
9192
pub metadata: NullableDenomMetadata,
9293
}
9394

94-
impl_response_constructor!(DenomMetadataResponse, metadata: DenomMetadata);
95+
impl_response_constructor!(NullableDenomMetadataResponse, metadata: NullableDenomMetadata);
9596

9697
impl QueryResponseType for DenomMetadataResponse {}
9798

packages/std/src/traits.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ use serde::{de::DeserializeOwned, Serialize};
66
use crate::coin::Coin;
77
#[cfg(feature = "iterator")]
88
use crate::iterator::{Order, Record};
9-
use crate::metadata::NullableDenomMetadata;
109
use crate::prelude::*;
1110
#[cfg(feature = "cosmwasm_1_2")]
1211
use crate::query::CodeInfoResponse;
1312
#[cfg(feature = "cosmwasm_1_1")]
1413
use crate::query::SupplyResponse;
1514
use crate::query::{
16-
AllBalanceResponse, BalanceResponse, BankQuery, CustomQuery, NullableDenomMetadataResponse,
17-
QueryRequest, WasmQuery,
15+
AllBalanceResponse, BalanceResponse, BankQuery, CustomQuery, QueryRequest, WasmQuery,
1816
};
1917
#[cfg(feature = "staking")]
2018
use crate::query::{
@@ -24,14 +22,14 @@ use crate::query::{
2422
#[cfg(feature = "cosmwasm_1_3")]
2523
use crate::query::{
2624
AllDenomMetadataResponse, DelegatorWithdrawAddressResponse, DenomMetadataResponse,
27-
DistributionQuery,
25+
DistributionQuery, NullableDenomMetadataResponse,
2826
};
2927
use crate::results::{ContractResult, Empty, SystemResult};
3028
use crate::ContractInfoResponse;
3129
use crate::{from_json, to_json_binary, to_json_vec, Binary};
3230
use crate::{Addr, CanonicalAddr};
3331
#[cfg(feature = "cosmwasm_1_3")]
34-
use crate::{DenomMetadata, PageRequest};
32+
use crate::{DenomMetadata, NullableDenomMetadata, PageRequest};
3533
use crate::{RecoverPubkeyError, StdError, StdResult, VerificationError};
3634

3735
#[derive(Clone, Copy, Debug)]

0 commit comments

Comments
 (0)