Skip to content

Commit 9d4842f

Browse files
committed
Remove redundant stuff
1 parent 8ed744c commit 9d4842f

21 files changed

+4
-40
lines changed

packages/derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ syn = { version = "1.0", features = ["full"] }
2222
# "What's even more fun, Cargo packages actually can have cyclic dependencies.
2323
# "(a package can have an indirect dev-dependency on itself)"
2424
# https://users.rust-lang.org/t/does-cargo-support-cyclic-dependencies/35666/3
25-
cosmwasm-std = { package = "cosmwasm-std", path = "../std" }
25+
cosmwasm-std = { path = "../std" }

packages/std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ hex = "0.4"
5757
uint = "0.9.3"
5858

5959
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
60-
cosmwasm-crypto = { path = "../crypto", package = "cosmwasm-crypto", version = "1.1.0" }
60+
cosmwasm-crypto = { path = "../crypto", version = "1.1.0" }
6161

6262
[dev-dependencies]
6363
cosmwasm-schema = { path = "../schema" }

packages/std/src/addresses.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ impl Addr {
3939
/// ## Examples
4040
///
4141
/// ```
42-
/// # use cosmwasm_std as coswasm_std;
43-
/// # use coswasm_std::{Addr};
42+
/// # use cosmwasm_std::{Addr};
4443
/// let address = Addr::unchecked("foobar");
4544
/// assert_eq!(address, "foobar");
4645
/// ```

packages/std/src/binary.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ impl Binary {
3939
/// Copy to array of explicit length
4040
///
4141
/// ```
42-
/// # use cosmwasm_std as cosmwasm_std;
4342
/// # use cosmwasm_std::Binary;
4443
/// let binary = Binary::from(&[0xfb, 0x1f, 0x37]);
4544
/// let array: [u8; 3] = binary.to_array().unwrap();
@@ -49,7 +48,6 @@ impl Binary {
4948
/// Copy to integer
5049
///
5150
/// ```
52-
/// # use cosmwasm_std as cosmwasm_std;
5351
/// # use cosmwasm_std::Binary;
5452
/// let binary = Binary::from(&[0x8b, 0x67, 0x64, 0x84, 0xb5, 0xfb, 0x1f, 0x37]);
5553
/// let num = u64::from_be_bytes(binary.to_array().unwrap());

packages/std/src/coin.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ impl fmt::Display for Coin {
3434
/// # Examples
3535
///
3636
/// ```
37-
/// # use cosmwasm_std as cosmwasm_std;
3837
/// # use cosmwasm_std::{coins, BankMsg, CosmosMsg, Response, SubMsg};
3938
/// # use cosmwasm_std::testing::{mock_env, mock_info};
4039
/// # let env = mock_env();
@@ -56,7 +55,6 @@ pub fn coins(amount: u128, denom: impl Into<String>) -> Vec<Coin> {
5655
/// # Examples
5756
///
5857
/// ```
59-
/// # use cosmwasm_std as cosmwasm_std;
6058
/// # use cosmwasm_std::{coin, BankMsg, CosmosMsg, Response, SubMsg};
6159
/// # use cosmwasm_std::testing::{mock_env, mock_info};
6260
/// # let env = mock_env();

packages/std/src/hex_binary.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ impl HexBinary {
3535
/// Copy to array of explicit length
3636
///
3737
/// ```
38-
/// # use cosmwasm_std as cosmwasm_std;
3938
/// # use cosmwasm_std::HexBinary;
4039
/// let data = HexBinary::from(&[0xfb, 0x1f, 0x37]);
4140
/// let array: [u8; 3] = data.to_array().unwrap();
@@ -45,7 +44,6 @@ impl HexBinary {
4544
/// Copy to integer
4645
///
4746
/// ```
48-
/// # use cosmwasm_std as cosmwasm_std;
4947
/// # use cosmwasm_std::HexBinary;
5048
/// let data = HexBinary::from(&[0x8b, 0x67, 0x64, 0x84, 0xb5, 0xfb, 0x1f, 0x37]);
5149
/// let num = u64::from_be_bytes(data.to_array().unwrap());

packages/std/src/math/decimal.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ impl Decimal {
8484
/// ## Examples
8585
///
8686
/// ```
87-
/// # use cosmwasm_std as cosmwasm_std;
8887
/// # use cosmwasm_std::{Decimal, Uint128};
8988
/// let a = Decimal::from_atomics(Uint128::new(1234), 3).unwrap();
9089
/// assert_eq!(a.to_string(), "1.234");
@@ -166,7 +165,6 @@ impl Decimal {
166165
/// ## Examples
167166
///
168167
/// ```
169-
/// # use cosmwasm_std as cosmwasm_std;
170168
/// # use cosmwasm_std::{Decimal, Uint128};
171169
/// # use std::str::FromStr;
172170
/// // Value with whole and fractional part

packages/std/src/math/decimal256.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ impl Decimal256 {
9494
/// ## Examples
9595
///
9696
/// ```
97-
/// # use cosmwasm_std as cosmwasm_std;
9897
/// # use cosmwasm_std::{Decimal256, Uint256};
9998
/// let a = Decimal256::from_atomics(1234u64, 3).unwrap();
10099
/// assert_eq!(a.to_string(), "1.234");
@@ -179,7 +178,6 @@ impl Decimal256 {
179178
/// ## Examples
180179
///
181180
/// ```
182-
/// # use cosmwasm_std as cosmwasm_std;
183181
/// # use cosmwasm_std::{Decimal256, Uint256};
184182
/// # use std::str::FromStr;
185183
/// // Value with whole and fractional part

packages/std/src/math/uint128.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use crate::{ConversionOverflowError, Uint256, Uint64};
2121
/// Use `from` to create instances of this and `u128` to get the value out:
2222
///
2323
/// ```
24-
/// # use cosmwasm_std as cosmwasm_std;
2524
/// # use cosmwasm_std::Uint128;
2625
/// let a = Uint128::from(123u128);
2726
/// assert_eq!(a.u128(), 123);
@@ -125,7 +124,6 @@ impl Uint128 {
125124
/// # Examples
126125
///
127126
/// ```
128-
/// # use cosmwasm_std as cosmwasm_std;
129127
/// use cosmwasm_std::Uint128;
130128
///
131129
/// let a = Uint128::MAX;

packages/std/src/math/uint256.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ use uints::U256;
3737
/// endian bytes:
3838
///
3939
/// ```
40-
/// # use cosmwasm_std as cosmwasm_std;
4140
/// # use cosmwasm_std::Uint256;
4241
/// let a = Uint256::from(258u128);
4342
/// let b = Uint256::new([
@@ -208,7 +207,6 @@ impl Uint256 {
208207
/// # Examples
209208
///
210209
/// ```
211-
/// # use cosmwasm_std as cosmwasm_std;
212210
/// use cosmwasm_std::Uint256;
213211
///
214212
/// let a = Uint256::MAX;

packages/std/src/math/uint512.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ use uints::U512;
3535
/// endian bytes:
3636
///
3737
/// ```
38-
/// # use cosmwasm_std as cosmwasm_std;
3938
/// # use cosmwasm_std::Uint512;
4039
/// let a = Uint512::from(258u128);
4140
/// let b = Uint512::new([

packages/std/src/math/uint64.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use crate::Uint128;
2020
/// Use `from` to create instances of this and `u64` to get the value out:
2121
///
2222
/// ```
23-
/// # use cosmwasm_std as cosmwasm_std;
2423
/// # use cosmwasm_std::Uint64;
2524
/// let a = Uint64::from(42u64);
2625
/// assert_eq!(a.u64(), 42);
@@ -121,7 +120,6 @@ impl Uint64 {
121120
/// # Examples
122121
///
123122
/// ```
124-
/// # use cosmwasm_std as cosmwasm_std;
125123
/// use cosmwasm_std::Uint64;
126124
///
127125
/// let a = Uint64::MAX;

packages/std/src/query/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ pub enum QueryRequest<C> {
5555
/// # Examples
5656
///
5757
/// ```
58-
/// # use cosmwasm_std as cosmwasm_std;
5958
/// # use cosmwasm_std::CustomQuery;
6059
/// # use schemars::JsonSchema;
6160
/// # use serde::{Deserialize, Serialize};

packages/std/src/results/contract_result.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use std::fmt;
1515
/// Success:
1616
///
1717
/// ```
18-
/// # use cosmwasm_std as cosmwasm_std;
1918
/// # use cosmwasm_std::{to_vec, ContractResult, Response};
2019
/// let response: Response = Response::default();
2120
/// let result: ContractResult<Response> = ContractResult::Ok(response);
@@ -25,7 +24,6 @@ use std::fmt;
2524
/// Failure:
2625
///
2726
/// ```
28-
/// # use cosmwasm_std as cosmwasm_std;
2927
/// # use cosmwasm_std::{to_vec, ContractResult, Response};
3028
/// let error_msg = String::from("Something went wrong");
3129
/// let result: ContractResult<Response> = ContractResult::Err(error_msg);

packages/std/src/results/response.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use super::{Attribute, CosmosMsg, Empty, Event, SubMsg};
1616
/// Direct:
1717
///
1818
/// ```
19-
/// # use cosmwasm_std as cosmwasm_std;
2019
/// # use cosmwasm_std::{Binary, DepsMut, Env, MessageInfo};
2120
/// # type InstantiateMsg = ();
2221
/// #
@@ -37,7 +36,6 @@ use super::{Attribute, CosmosMsg, Empty, Event, SubMsg};
3736
/// Mutating:
3837
///
3938
/// ```
40-
/// # use cosmwasm_std as cosmwasm_std;
4139
/// # use cosmwasm_std::{coins, BankMsg, Binary, DepsMut, Env, MessageInfo, SubMsg};
4240
/// # type InstantiateMsg = ();
4341
/// # type MyError = ();
@@ -157,7 +155,6 @@ impl<T> Response<T> {
157155
/// Adding a list of attributes using the pair notation for key and value:
158156
///
159157
/// ```
160-
/// # use cosmwasm_std as cosmwasm_std;
161158
/// use cosmwasm_std::Response;
162159
///
163160
/// let attrs = vec![
@@ -172,7 +169,6 @@ impl<T> Response<T> {
172169
/// Adding an optional value as an optional attribute by turning it into a list of 0 or 1 elements:
173170
///
174171
/// ```
175-
/// # use cosmwasm_std as cosmwasm_std;
176172
/// use cosmwasm_std::{Attribute, Response};
177173
///
178174
/// // Some value
@@ -204,7 +200,6 @@ impl<T> Response<T> {
204200
/// ## Examples
205201
///
206202
/// ```
207-
/// # use cosmwasm_std as cosmwasm_std;
208203
/// use cosmwasm_std::{CosmosMsg, Response};
209204
///
210205
/// fn make_response_with_msgs(msgs: Vec<CosmosMsg>) -> Response {
@@ -220,7 +215,6 @@ impl<T> Response<T> {
220215
/// ## Examples
221216
///
222217
/// ```
223-
/// # use cosmwasm_std as cosmwasm_std;
224218
/// use cosmwasm_std::{SubMsg, Response};
225219
///
226220
/// fn make_response_with_submsgs(msgs: Vec<SubMsg>) -> Response {

packages/std/src/results/submessages.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ impl<T> SubMsg<T> {
7373
/// ## Examples
7474
///
7575
/// ```
76-
/// # use cosmwasm_std as cosmwasm_std;
7776
/// # use cosmwasm_std::{coins, BankMsg, ReplyOn, SubMsg};
7877
/// # let msg = BankMsg::Send { to_address: String::from("you"), amount: coins(1015, "earth") };
7978
/// let sub_msg: SubMsg = SubMsg::reply_always(msg, 1234).with_gas_limit(60_000);
@@ -121,7 +120,6 @@ pub struct Reply {
121120
/// Success:
122121
///
123122
/// ```
124-
/// # use cosmwasm_std as cosmwasm_std;
125123
/// # use cosmwasm_std::{to_vec, Binary, Event, SubMsgResponse, SubMsgResult};
126124
/// let response = SubMsgResponse {
127125
/// data: Some(Binary::from_base64("MTIzCg==").unwrap()),
@@ -134,7 +132,6 @@ pub struct Reply {
134132
/// Failure:
135133
///
136134
/// ```
137-
/// # use cosmwasm_std as cosmwasm_std;
138135
/// # use cosmwasm_std::{to_vec, SubMsgResult, Response};
139136
/// let error_msg = String::from("Something went wrong");
140137
/// let result = SubMsgResult::Err(error_msg);

packages/std/src/results/system_result.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use super::super::errors::SystemError;
1515
/// Success:
1616
///
1717
/// ```
18-
/// # use cosmwasm_std as cosmwasm_std;
1918
/// # use cosmwasm_std::{to_vec, Binary, ContractResult, SystemResult};
2019
/// let data = Binary::from(b"hello, world");
2120
/// let result = SystemResult::Ok(ContractResult::Ok(data));
@@ -25,7 +24,6 @@ use super::super::errors::SystemError;
2524
/// Failure:
2625
///
2726
/// ```
28-
/// # use cosmwasm_std as cosmwasm_std;
2927
/// # use cosmwasm_std::{to_vec, Binary, ContractResult, SystemResult, SystemError};
3028
/// let error = SystemError::Unknown {};
3129
/// let result: SystemResult<Binary> = SystemResult::Err(error);

packages/std/src/timestamp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use crate::math::Uint64;
1111
/// ## Examples
1212
///
1313
/// ```
14-
/// # use cosmwasm_std as cosmwasm_std;
1514
/// # use cosmwasm_std::Timestamp;
1615
/// let ts = Timestamp::from_nanos(1_000_000_202);
1716
/// assert_eq!(ts.nanos(), 1_000_000_202);

packages/std/src/traits.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ pub trait Api {
8484
/// ## Examples
8585
///
8686
/// ```
87-
/// # use cosmwasm_std as cosmwasm_std;
8887
/// # use cosmwasm_std::{Api, Addr};
8988
/// # use cosmwasm_std::testing::MockApi;
9089
/// # let api = MockApi::default();

packages/std/src/types.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ pub struct BlockInfo {
4040
/// Using chrono:
4141
///
4242
/// ```
43-
/// # use cosmwasm_std as cosmwasm_std;
4443
/// # use cosmwasm_std::{Addr, BlockInfo, ContractInfo, Env, MessageInfo, Timestamp, TransactionInfo};
4544
/// # let env = Env {
4645
/// # block: BlockInfo {
@@ -64,7 +63,6 @@ pub struct BlockInfo {
6463
/// Creating a simple millisecond-precision timestamp (as used in JavaScript):
6564
///
6665
/// ```
67-
/// # use cosmwasm_std as cosmwasm_std;
6866
/// # use cosmwasm_std::{Addr, BlockInfo, ContractInfo, Env, MessageInfo, Timestamp, TransactionInfo};
6967
/// # let env = Env {
7068
/// # block: BlockInfo {

packages/storage/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ iterator = ["cosmwasm-std/iterator"]
1919

2020
[dependencies]
2121
# Uses the path when built locally; uses the given version from crates.io when published
22-
cosmwasm-std = { version = "1.1.0", path = "../std", package = "cosmwasm-std", default-features = false }
22+
cosmwasm-std = { version = "1.1.0", path = "../std", default-features = false }
2323
serde = { version = "1.0.103", default-features = false, features = [
2424
"derive",
2525
"alloc",

0 commit comments

Comments
 (0)