From 01e94487b7b89fc3aa0f8886dd839a01d255cf5b Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 2 Jan 2023 15:00:17 +0100 Subject: [PATCH] Deprecate ContractInfoResponse::new --- packages/std/src/query/wasm.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/std/src/query/wasm.rs b/packages/std/src/query/wasm.rs index 6bd52dde91..153b35f51c 100644 --- a/packages/std/src/query/wasm.rs +++ b/packages/std/src/query/wasm.rs @@ -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) -> 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 } }