From ff7db09f84c3a0ac534aa82c278a764ec7d8bd97 Mon Sep 17 00:00:00 2001 From: Thomas Luijken Date: Tue, 10 Sep 2024 14:11:46 +0200 Subject: [PATCH] Formatting --- stellar_rust_sdk/src/models/mod.rs | 4 ++-- stellar_rust_sdk/src/order_book/details_request.rs | 4 ++-- stellar_rust_sdk/src/order_book/mod.rs | 4 +--- stellar_rust_sdk/src/paths/mod.rs | 3 +-- stellar_rust_sdk/src/trades/all_trades_request.rs | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/stellar_rust_sdk/src/models/mod.rs b/stellar_rust_sdk/src/models/mod.rs index 5acfbf8..7a9f497 100644 --- a/stellar_rust_sdk/src/models/mod.rs +++ b/stellar_rust_sdk/src/models/mod.rs @@ -1,9 +1,9 @@ -mod response_models; mod request_models; +mod response_models; pub mod prelude { - pub use super::response_models::*; pub use super::request_models::*; + pub use super::response_models::*; pub use super::Request; pub use super::Response; } diff --git a/stellar_rust_sdk/src/order_book/details_request.rs b/stellar_rust_sdk/src/order_book/details_request.rs index b2a1b03..d4e7e40 100644 --- a/stellar_rust_sdk/src/order_book/details_request.rs +++ b/stellar_rust_sdk/src/order_book/details_request.rs @@ -1,5 +1,5 @@ -use crate::models::Request; use crate::models::prelude::AssetType; +use crate::models::Request; pub struct SellingAsset(AssetType); pub struct NoSellingAsset; pub struct BuyingAsset(AssetType); @@ -140,8 +140,8 @@ mod tests { #[test] fn test_details_request() { - use crate::models::prelude::{AssetType, AssetData}; use super::DetailsRequest; + use crate::models::prelude::{AssetData, AssetType}; use crate::models::Request; let details_request = DetailsRequest::new() .set_buying_asset(AssetType::Native) diff --git a/stellar_rust_sdk/src/order_book/mod.rs b/stellar_rust_sdk/src/order_book/mod.rs index 820c232..bf7d3cc 100644 --- a/stellar_rust_sdk/src/order_book/mod.rs +++ b/stellar_rust_sdk/src/order_book/mod.rs @@ -10,12 +10,10 @@ pub mod prelude { pub mod tests { - #[tokio::test] async fn get_order_bookdetails() { - - use crate::models::prelude::*; use crate::horizon_client; + use crate::models::prelude::*; use crate::order_book::prelude::DetailsRequest; const BIDS_N: &u32 = &1; diff --git a/stellar_rust_sdk/src/paths/mod.rs b/stellar_rust_sdk/src/paths/mod.rs index 5142b9b..78c216b 100644 --- a/stellar_rust_sdk/src/paths/mod.rs +++ b/stellar_rust_sdk/src/paths/mod.rs @@ -118,8 +118,8 @@ pub mod prelude { #[cfg(test)] mod tests { use super::prelude::*; - use crate::models::prelude::*; use super::{AssetType, IssuedOrNative}; + use crate::models::prelude::*; use crate::{horizon_client::HorizonClient, models::*}; const SOURCE_ASSET_TYPE: &str = "native"; @@ -191,7 +191,6 @@ mod tests { let response = horizon_client.get_find_payment_paths(&request).await; - assert!(response.clone().is_ok()); let binding = response.unwrap(); let response = &binding.embedded().records()[0]; diff --git a/stellar_rust_sdk/src/trades/all_trades_request.rs b/stellar_rust_sdk/src/trades/all_trades_request.rs index 11d7a9b..f7cb7bc 100644 --- a/stellar_rust_sdk/src/trades/all_trades_request.rs +++ b/stellar_rust_sdk/src/trades/all_trades_request.rs @@ -1,6 +1,6 @@ +use crate::models::prelude::AssetType; use crate::models::*; use stellar_rust_sdk_derive::pagination; -use crate::models::prelude::AssetType; /// Represents the base and counter assets. Contains an enum of one of the possible asset types. #[derive(PartialEq, Debug)]