File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ pub struct SupplyResponse {
33
33
34
34
#[ cfg( feature = "cosmwasm_1_1" ) ]
35
35
impl SupplyResponse {
36
+ /// Constructor for testing frameworks such as cw-multi-test.
37
+ /// This is required because query response types should be #[non_exhaustive].
38
+ /// As a contract developer you should not need this constructor since
39
+ /// query responses are constructed for you via deserialization.
40
+ #[ doc( hidden) ]
36
41
pub fn new ( amount : Coin ) -> Self {
37
42
Self { amount }
38
43
}
Original file line number Diff line number Diff line change @@ -41,7 +41,10 @@ pub struct ContractInfoResponse {
41
41
}
42
42
43
43
impl ContractInfoResponse {
44
- /// Convenience constructor for tests / mocks
44
+ /// Constructor for testing frameworks such as cw-multi-test.
45
+ /// This is required because query response types should be #[non_exhaustive].
46
+ /// As a contract developer you should not need this constructor since
47
+ /// query responses are constructed for you via deserialization.
45
48
#[ doc( hidden) ]
46
49
pub fn new ( code_id : u64 , creator : impl Into < String > ) -> Self {
47
50
Self {
You can’t perform that action at this time.
0 commit comments