Top to bottom pub mod then mod then pub use then use (incl. use crate and use self)

This commit is contained in:
Daniel Karzel 2021-01-21 17:09:53 +11:00
parent 44c4b5dcea
commit 433704e48c
14 changed files with 38 additions and 33 deletions

View file

@ -1,8 +1,8 @@
pub mod testutils;
use swap::protocol::{alice, bob};
use tokio::join;
pub mod testutils;
/// Run the following tests with RUST_MIN_STACK=10000000
#[tokio::test]

View file

@ -1,7 +1,7 @@
use swap::protocol::{alice, alice::AliceState, bob};
pub mod testutils;
use swap::protocol::{alice, alice::AliceState, bob};
#[tokio::test]
async fn given_alice_restarts_after_encsig_is_learned_resume_swap() {
testutils::setup_test(|mut ctx| async move {

View file

@ -1,7 +1,7 @@
use swap::protocol::{alice, bob, bob::BobState};
pub mod testutils;
use swap::protocol::{alice, bob, bob::BobState};
#[tokio::test]
async fn given_bob_restarts_after_encsig_is_sent_resume_swap() {
testutils::setup_test(|mut ctx| async move {

View file

@ -1,10 +1,10 @@
pub mod testutils;
use swap::protocol::{
alice, bob,
bob::{swap::is_xmr_locked, BobState},
};
pub mod testutils;
#[tokio::test]
async fn given_bob_restarts_after_xmr_is_locked_resume_swap() {
testutils::setup_test(|mut ctx| async move {

View file

@ -1,10 +1,10 @@
pub mod testutils;
use swap::protocol::{
alice, bob,
bob::{swap::is_btc_locked, BobState},
};
pub mod testutils;
/// Bob locks Btc and Alice locks Xmr. Bob does not act; he fails to send Alice
/// the encsig and fail to refund or redeem. Alice punishes.
#[tokio::test]

View file

@ -1,7 +1,7 @@
use swap::protocol::{alice, alice::AliceState, bob};
pub mod testutils;
use swap::protocol::{alice, alice::AliceState, bob};
/// Bob locks btc and Alice locks xmr. Alice fails to act so Bob refunds. Alice
/// then also refunds.
#[tokio::test]