Skip to content

Commit 24b6b44

Browse files
committed
chore: Update after review
1 parent f7f784a commit 24b6b44

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

packages/std/src/binary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl Binary {
7676
}
7777

7878
pub fn to_hex(&self) -> String {
79-
hex::encode(self.0.clone())
79+
hex::encode(&self.0)
8080
}
8181
}
8282

packages/std/src/testing/mock.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,10 @@ mod tests {
14671467
},
14681468
transaction: Some(TransactionInfo::new(
14691469
3,
1470-
Binary::from_hex("E5469DACEC17CEF8A260FD37675ED87E7FB6A2B5AD95193C51308006C7E494B3").unwrap(),
1470+
Binary::from_hex(
1471+
"E5469DACEC17CEF8A260FD37675ED87E7FB6A2B5AD95193C51308006C7E494B3"
1472+
)
1473+
.unwrap(),
14711474
)),
14721475
contract: ContractInfo {
14731476
address: Addr::unchecked(MOCK_CONTRACT_ADDR)

packages/std/src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/// Implements a hidden constructor for non-exhaustive structures that need
22
/// to be built in libraries like cw-multi-test.
33
macro_rules! impl_hidden_constructor {
4-
( $response:ty, $( $field: ident : $t: ty),* ) => {
5-
impl $response {
4+
( $type:ty, $( $field: ident : $t: ty),* ) => {
5+
impl $type {
66
/// Constructor for testing frameworks such as cw-multi-test.
77
/// This is required because the type is #[non_exhaustive].
88
/// As a contract developer you should not need this constructor since

packages/vm/src/testing/mock.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ pub fn mock_env() -> Env {
282282
},
283283
transaction: Some(TransactionInfo::new(
284284
3,
285-
Binary::from_hex("E5469DACEC17CEF8A260FD37675ED87E7FB6A2B5AD95193C51308006C7E494B3").unwrap(),
285+
Binary::from_hex("E5469DACEC17CEF8A260FD37675ED87E7FB6A2B5AD95193C51308006C7E494B3")
286+
.unwrap(),
286287
)),
287288
contract: ContractInfo {
288289
address: Addr::unchecked(contract_addr),

0 commit comments

Comments
 (0)