Skip to content

Commit

Permalink
Deprecate ContractInfoResponse::new
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Jan 2, 2023
1 parent cc1cf89 commit 01e9448
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/std/src/query/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ impl ContractInfoResponse {
/// As a contract developer you should not need this constructor since
/// query responses are constructed for you via deserialization.
#[doc(hidden)]
#[deprecated(
note = "Use ContractInfoResponse::default() and mutate the fields you want to set."
)]
pub fn new(code_id: u64, creator: impl Into<String>) -> Self {
Self {
code_id,
creator: creator.into(),
admin: None,
pinned: false,
ibc_port: None,
}
let mut out = ContractInfoResponse::default();
out.code_id = code_id;
out.creator = creator.into();
out
}
}

0 comments on commit 01e9448

Please sign in to comment.