Skip to content

Commit

Permalink
Remove macro_use and extern crate uses that are unnecessary (stellar#151
Browse files Browse the repository at this point in the history
)
  • Loading branch information
leighmcculloch authored Oct 13, 2022
1 parent 1562993 commit 88cb7b0
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 20 deletions.
3 changes: 0 additions & 3 deletions liquidity_pool_router/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#![no_std]

#[cfg(any(test, feature = "testutils"))]
extern crate std;

mod pool_contract;
mod test;
pub mod testutils;
Expand Down
3 changes: 3 additions & 0 deletions liquidity_pool_router/src/pool_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ pub fn create_contract(e: &Env, salt: &BytesN<32>) -> BytesN<32> {
e.deployer().with_current_contract(salt).deploy(bin)
}

#[cfg(all(any(test, feature = "testutils"), not(feature = "token-wasm")))]
extern crate std;

#[cfg(all(any(test, feature = "testutils"), not(feature = "token-wasm")))]
pub fn create_contract(e: &Env, salt: &BytesN<32>) -> BytesN<32> {
use sha2::{Digest, Sha256};
Expand Down
3 changes: 0 additions & 3 deletions single_offer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#![no_std]

#[cfg(feature = "testutils")]
extern crate std;

mod test;
pub mod testutils;

Expand Down
3 changes: 0 additions & 3 deletions single_offer_router/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#![no_std]

#[cfg(any(test, feature = "testutils"))]
extern crate std;

mod offer_contract;
mod test;
pub mod testutils;
Expand Down
3 changes: 3 additions & 0 deletions single_offer_router/src/offer_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ pub fn create_contract(e: &Env, salt: &BytesN<32>) -> BytesN<32> {
e.deployer().with_current_contract(salt).deploy(bin)
}

#[cfg(all(any(test, feature = "testutils"), not(feature = "token-wasm")))]
extern crate std;

#[cfg(all(any(test, feature = "testutils"), not(feature = "token-wasm")))]
pub fn create_contract(e: &Env, salt: &BytesN<32>) -> BytesN<32> {
use sha2::{Digest, Sha256};
Expand Down
3 changes: 0 additions & 3 deletions single_offer_xfer_from/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#![no_std]

#[cfg(feature = "testutils")]
extern crate std;

mod test;
pub mod testutils;

Expand Down
2 changes: 0 additions & 2 deletions timelock/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
//! account(s) claim it before or after provided time point.
//! For simplicity, the contract only supports invoker-based auth.
#![no_std]
#[cfg(feature = "testutils")]
extern crate std;

use soroban_sdk::{contractimpl, contracttype, BigInt, BytesN, Env, Vec};

Expand Down
4 changes: 0 additions & 4 deletions token/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#![no_std]

#[cfg(any(test, feature = "testutils"))]
#[macro_use]
extern crate std;

mod admin;
mod allowance;
mod balance;
Expand Down
2 changes: 0 additions & 2 deletions wallet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
//! complex auth scheme with multiple signers that authorize payments in immediate
//! or delayed (async) fashion.
#![no_std]
#[cfg(feature = "testutils")]
extern crate std;

use soroban_auth::{verify, Identifier, Signature};
use soroban_sdk::{
Expand Down

0 comments on commit 88cb7b0

Please sign in to comment.