Skip to content

Commit

Permalink
chore: Revert adding non_exhaustive on old context types.
Browse files Browse the repository at this point in the history
Remove unnecessary `#[allow(deprecated)]` statements.
  • Loading branch information
jawoznia committed Nov 5, 2024
1 parent 280ee80 commit c6450bd
Show file tree
Hide file tree
Showing 74 changed files with 220 additions and 303 deletions.
4 changes: 1 addition & 3 deletions examples/contracts/custom/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#![allow(deprecated)]

use cw_storage_plus::Item;
use sylvia::contract;
use sylvia::ctx::{ExecCtx, InstantiateCtx, QueryCtx, SudoCtx};
use sylvia::cw_std::{CosmosMsg, QueryRequest, Response, StdResult};
use sylvia::types::{ExecCtx, InstantiateCtx, QueryCtx, SudoCtx};

#[cfg(not(feature = "library"))]
use sylvia::entry_points;
Expand Down
4 changes: 1 addition & 3 deletions examples/contracts/custom/src/cw1.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#![allow(deprecated)]

use cw1::{CanExecuteResp, Cw1};
use sylvia::ctx::{ExecCtx, QueryCtx};
use sylvia::cw_std::{CosmosMsg, Empty, Response, StdError, StdResult};
use sylvia::types::{ExecCtx, QueryCtx};

use crate::contract::CustomContract;

Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/cw1-subkeys/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#![allow(deprecated)]

use cw1_whitelist::contract::Cw1WhitelistContract;
use cw2::set_contract_version;
use cw_storage_plus::{Bound, Map};
use cw_utils::Expiration;
use sylvia::contract;
use sylvia::ctx::{ExecCtx, InstantiateCtx, QueryCtx};
use sylvia::cw_std::{
ensure, ensure_ne, Addr, BankMsg, Coin, CosmosMsg, Deps, DistributionMsg, Env, Order, Response,
StakingMsg, StdResult,
};
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, InstantiateCtx, QueryCtx};
use sylvia::types::{CustomMsg, CustomQuery};

#[cfg(not(feature = "library"))]
use sylvia::cw_std::Empty;
Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/cw1-subkeys/src/cw1.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#![allow(deprecated)]

use cw1::{CanExecuteResp, Cw1};
use sylvia::ctx::{ExecCtx, QueryCtx};
use sylvia::cw_std::{ensure, Addr, CosmosMsg, Response, StdResult};
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx};
use sylvia::types::{CustomMsg, CustomQuery};

use crate::contract::Cw1SubkeysContract;
use crate::error::ContractError;
Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/cw1-subkeys/src/whitelist.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![allow(deprecated)]

use sylvia::ctx::{ExecCtx, QueryCtx};
use sylvia::cw_std::{Response, StdResult};
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx};
use sylvia::types::{CustomMsg, CustomQuery};
use whitelist::responses::AdminListResponse;
use whitelist::Whitelist;

Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/cw1-whitelist/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#![allow(deprecated)]

use crate::error::ContractError;
use cw2::set_contract_version;
use cw_storage_plus::{Item, Map};
use sylvia::contract;
use sylvia::ctx::InstantiateCtx;
use sylvia::cw_std::{Addr, Deps, Empty, Response};
use sylvia::types::{CustomMsg, CustomQuery, InstantiateCtx};
use sylvia::types::{CustomMsg, CustomQuery};

#[cfg(not(feature = "library"))]
use sylvia::entry_points;
Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/cw1-whitelist/src/cw1.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#![allow(deprecated)]

use cw1::{CanExecuteResp, Cw1};
use sylvia::ctx::{ExecCtx, QueryCtx};
use sylvia::cw_std::{Addr, CosmosMsg, Response, StdResult};
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx};
use sylvia::types::{CustomMsg, CustomQuery};

use crate::contract::Cw1WhitelistContract;
use crate::error::ContractError;
Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/cw1-whitelist/src/whitelist.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![allow(deprecated)]

use sylvia::ctx::{ExecCtx, QueryCtx};
use sylvia::cw_std::{Empty, Order, Response, StdResult};
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx};
use sylvia::types::{CustomMsg, CustomQuery};
use whitelist::responses::AdminListResponse;
use whitelist::Whitelist;

Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/cw20-base/src/allowances.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#![allow(deprecated)]

use cw20_allowances::responses::{
AllAccountsResponse, AllAllowancesResponse, AllSpenderAllowancesResponse, AllowanceInfo,
AllowanceResponse, SpenderAllowanceInfo,
};
use cw20_allowances::Cw20Allowances;
use cw_storage_plus::{Bound, Bounder};
use cw_utils::Expiration;
use sylvia::ctx::{ExecCtx, QueryCtx};
use sylvia::cw_std::{Addr, Binary, Order, Response, StdError, StdResult, Uint128};
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx};
use sylvia::types::{CustomMsg, CustomQuery};

use crate::contract::Cw20Base;
use crate::error::ContractError;
Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/cw20-base/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(deprecated)]

use crate::error::ContractError;
use crate::responses::{BalanceResponse, Cw20Coin, Cw20ReceiveMsg, TokenInfoResponse};
use crate::validation::{validate_accounts, validate_msg, verify_logo};
Expand All @@ -10,12 +8,13 @@ use cw20_marketing::Logo;
use cw20_minting::responses::MinterResponse;
use cw_storage_plus::{Item, Map};
use sylvia::contract;
use sylvia::ctx::{ExecCtx, InstantiateCtx, MigrateCtx, QueryCtx};
use sylvia::cw_schema::cw_serde;
use sylvia::cw_std::{
ensure, Addr, Binary, BlockInfo, DepsMut, Order, Response, StdError, StdResult, Storage,
Uint128,
};
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, InstantiateCtx, MigrateCtx, QueryCtx};
use sylvia::types::{CustomMsg, CustomQuery};

#[cfg(not(feature = "library"))]
use sylvia::cw_std::Empty;
Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/cw20-base/src/marketing.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#![allow(deprecated)]

use crate::contract::Cw20Base;
use crate::error::ContractError;
use crate::validation::verify_logo;
use cw20_marketing::responses::{DownloadLogoResponse, LogoInfo, MarketingInfoResponse};
use cw20_marketing::{Cw20Marketing, EmbeddedLogo, Logo};
use sylvia::ctx::{ExecCtx, QueryCtx};
use sylvia::cw_std::{Response, StdError, StdResult};
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx};
use sylvia::types::{CustomMsg, CustomQuery};

impl<E, Q> Cw20Marketing for Cw20Base<E, Q>
where
Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/cw20-base/src/minting.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#![allow(deprecated)]

use crate::contract::{Cw20Base, MinterData};
use crate::error::ContractError;
use cw20_minting::responses::MinterResponse;
use cw20_minting::Cw20Minting;
use sylvia::ctx::{ExecCtx, QueryCtx};
use sylvia::cw_std::{Response, StdResult, Uint128};
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx};
use sylvia::types::{CustomMsg, CustomQuery};

impl<E, Q> Cw20Minting for Cw20Base<E, Q>
where
Expand Down
6 changes: 2 additions & 4 deletions examples/contracts/cw20-base/src/multitest/receiver.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#![allow(deprecated)]

use sylvia::ctx::ExecCtx;
use sylvia::cw_std::{Binary, Response, StdError, Uint128};
use sylvia::interface;
use sylvia::types::ExecCtx;

#[interface]
#[sv::custom(msg=sylvia::cw_std::Empty, query=sylvia::cw_std::Empty)]
Expand All @@ -21,8 +19,8 @@ pub trait Receiver {

pub mod impl_receiver {
use crate::multitest::receiver_contract::ReceiverContract;
use sylvia::ctx::ExecCtx;
use sylvia::cw_std::{Response, StdError};
use sylvia::types::ExecCtx;

impl super::Receiver for ReceiverContract {
type Error = StdError;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#![allow(deprecated)]

use sylvia::contract;
use sylvia::ctx::InstantiateCtx;
use sylvia::cw_std::{Response, StdResult};
use sylvia::types::InstantiateCtx;

use super::receiver;
pub struct ReceiverContract {}
Expand Down
4 changes: 1 addition & 3 deletions examples/contracts/entry-points-overriding/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#![allow(deprecated)]

use cw_storage_plus::Item;
use sylvia::contract;
use sylvia::ctx::{ExecCtx, InstantiateCtx, QueryCtx};
use sylvia::cw_std::{Response, StdError, StdResult};
use sylvia::types::{ExecCtx, InstantiateCtx, QueryCtx};

#[cfg(not(feature = "library"))]
use sylvia::entry_points;
Expand Down
4 changes: 1 addition & 3 deletions examples/contracts/entry-points-overriding/src/messages.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#![allow(deprecated)]

use sylvia::ctx::ExecCtx;
use sylvia::cw_schema::cw_serde;
use sylvia::cw_std::{DepsMut, Env, MessageInfo, Response, StdError, StdResult};
use sylvia::types::ExecCtx;

use crate::contract::sv::ContractExecMsg;
use crate::contract::CounterContract;
Expand Down
8 changes: 3 additions & 5 deletions examples/contracts/generic_contract/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#![allow(deprecated)]

use cw_storage_plus::Item;
use sylvia::contract;
use sylvia::ctx::ReplyCtx;
use sylvia::ctx::{ExecCtx, InstantiateCtx, MigrateCtx, QueryCtx, ReplyCtx, SudoCtx};
use sylvia::cw_std::{Binary, Response, StdResult, SubMsgResult};
use sylvia::serde::Deserialize;
use sylvia::types::{CustomMsg, ExecCtx, InstantiateCtx, MigrateCtx, QueryCtx, SudoCtx};
use sylvia::types::CustomMsg;

#[cfg(not(feature = "library"))]
use sylvia::entry_points;
Expand Down Expand Up @@ -184,7 +182,7 @@ where
Ok(Response::new())
}

#[allow(dead_code, deprecated)]
#[allow(dead_code)]
#[sv::msg(reply)]
fn reply(
&self,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#![allow(deprecated)]

use custom_and_generic::CustomAndGeneric;
use sylvia::ctx::{ExecCtx, QueryCtx, SudoCtx};
use sylvia::cw_std::{CosmosMsg, Response, StdError, StdResult};
use sylvia::types::{ExecCtx, QueryCtx, SudoCtx};

use crate::contract::{GenericContract, SvCustomMsg, SvCustomQuery};

Expand Down
4 changes: 1 addition & 3 deletions examples/contracts/generic_contract/src/cw1.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#![allow(deprecated)]

use crate::contract::GenericContract;
use cw1::{CanExecuteResp, Cw1};
use sylvia::ctx::{ExecCtx, QueryCtx};
use sylvia::cw_std::{CosmosMsg, Empty, Response, StdError, StdResult};
use sylvia::types::{ExecCtx, QueryCtx};

impl<
InstantiateT,
Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/generic_contract/src/generic.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#![allow(deprecated)]

use generic::Generic;
use sylvia::ctx::{ExecCtx, QueryCtx, SudoCtx};
use sylvia::cw_std::{CosmosMsg, Response, StdError, StdResult};
use sylvia::serde::Deserialize;
use sylvia::types::{CustomMsg, ExecCtx, QueryCtx, SudoCtx};
use sylvia::types::CustomMsg;

use crate::contract::{GenericContract, SvCustomMsg};

Expand Down
4 changes: 1 addition & 3 deletions examples/contracts/generic_iface_on_contract/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#![allow(deprecated)]

use sylvia::contract;
use sylvia::ctx::InstantiateCtx;
use sylvia::cw_std::{Response, StdResult};
use sylvia::types::InstantiateCtx;

#[cfg(not(feature = "library"))]
use sylvia::entry_points;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#![allow(deprecated)]

use crate::contract::{SvCustomMsg, SvCustomQuery};
use custom_and_generic::CustomAndGeneric;
use sylvia::ctx::{ExecCtx, QueryCtx, SudoCtx};
use sylvia::cw_std::{CosmosMsg, Response, StdError, StdResult};
use sylvia::types::{ExecCtx, QueryCtx, SudoCtx};

impl CustomAndGeneric for crate::contract::NonGenericContract {
type Error = StdError;
Expand Down
4 changes: 1 addition & 3 deletions examples/contracts/generic_iface_on_contract/src/cw1.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#![allow(deprecated)]

use cw1::{CanExecuteResp, Cw1};
use sylvia::ctx::{ExecCtx, QueryCtx};
use sylvia::cw_std::{CosmosMsg, Empty, Response, StdError, StdResult};
use sylvia::types::{ExecCtx, QueryCtx};

impl Cw1 for crate::contract::NonGenericContract {
type Error = StdError;
Expand Down
4 changes: 1 addition & 3 deletions examples/contracts/generic_iface_on_contract/src/generic.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#![allow(deprecated)]

use generic::Generic;
use sylvia::ctx::{ExecCtx, QueryCtx, SudoCtx};
use sylvia::cw_std::{CosmosMsg, Response, StdError, StdResult};
use sylvia::types::{ExecCtx, QueryCtx, SudoCtx};

use crate::contract::SvCustomMsg;

Expand Down
10 changes: 4 additions & 6 deletions examples/contracts/generics_forwarded/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
#![allow(clippy::type_complexity, deprecated)]
#![allow(clippy::type_complexity)]

use crate::error::ContractError;
use cw_storage_plus::Item;
use sylvia::contract;
use sylvia::ctx::ReplyCtx;
use sylvia::ctx::{ExecCtx, InstantiateCtx, MigrateCtx, QueryCtx, ReplyCtx, SudoCtx};
use sylvia::cw_std::{Binary, Response, SubMsgResult};
use sylvia::serde::Deserialize;
use sylvia::types::{
CustomMsg, CustomQuery, ExecCtx, InstantiateCtx, MigrateCtx, QueryCtx, SudoCtx,
};
use sylvia::types::{CustomMsg, CustomQuery};

#[sylvia::cw_schema::cw_serde(crate = "sylvia::cw_schema")]
pub struct SvCustomMsg;
Expand Down Expand Up @@ -193,7 +191,7 @@ where
Ok(Response::new())
}

#[allow(dead_code, deprecated)]
#[allow(dead_code)]
#[sv::msg(reply)]
fn reply(
&self,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#![allow(deprecated)]

use custom_and_generic::CustomAndGeneric;
use sylvia::ctx::{ExecCtx, QueryCtx, SudoCtx};
use sylvia::cw_std::{CosmosMsg, Response};
use sylvia::serde::Deserialize;
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx, SudoCtx};
use sylvia::types::{CustomMsg, CustomQuery};

use crate::contract::{GenericsForwardedContract, SvCustomMsg};
use crate::error::ContractError;
Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/generics_forwarded/src/cw1.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#![allow(deprecated)]

use cw1::{CanExecuteResp, Cw1};
use sylvia::ctx::{ExecCtx, QueryCtx};
use sylvia::cw_schema::schemars::JsonSchema;
use sylvia::cw_std::{CosmosMsg, CustomMsg, Empty, Response, StdResult};
use sylvia::serde::de::DeserializeOwned;
use sylvia::serde::Deserialize;
use sylvia::types::{CustomQuery, ExecCtx, QueryCtx};
use sylvia::types::CustomQuery;

use crate::contract::GenericsForwardedContract;
use crate::error::ContractError;
Expand Down
5 changes: 2 additions & 3 deletions examples/contracts/generics_forwarded/src/generic.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#![allow(deprecated)]

use generic::Generic;
use sylvia::ctx::{ExecCtx, QueryCtx, SudoCtx};
use sylvia::cw_std::{CosmosMsg, Response};
use sylvia::serde::Deserialize;
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx, SudoCtx};
use sylvia::types::{CustomMsg, CustomQuery};

use crate::contract::{GenericsForwardedContract, SvCustomMsg};
use crate::error::ContractError;
Expand Down
6 changes: 2 additions & 4 deletions examples/interfaces/custom-and-generic/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#![allow(deprecated)]

use sylvia::ctx::{ExecCtx, QueryCtx, SudoCtx};
use sylvia::cw_std::{CosmosMsg, Response, StdError};

use sylvia::interface;
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx, SudoCtx};
use sylvia::types::{CustomMsg, CustomQuery};

#[interface]
pub trait CustomAndGeneric {
Expand Down
5 changes: 2 additions & 3 deletions examples/interfaces/cw1/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#![allow(deprecated)]

use sylvia::ctx::{ExecCtx, QueryCtx};
use sylvia::cw_std::{CosmosMsg, Response, StdError, StdResult};
use sylvia::serde::{Deserialize, Serialize};
use sylvia::types::{CustomMsg, CustomQuery, ExecCtx, QueryCtx};
use sylvia::types::{CustomMsg, CustomQuery};
use sylvia::{interface, schemars};

#[derive(
Expand Down
Loading

0 comments on commit c6450bd

Please sign in to comment.