Skip to content

Commit

Permalink
Remove all warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-pease authored and LeonardTibben committed Jul 11, 2024
1 parent 092d375 commit de3e9af
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 27 deletions.
1 change: 0 additions & 1 deletion stellar_rust_sdk/src/assets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ pub mod test {
static CONTRACTS_AMOUNT: &str = "0.0000000";
static BALANCES_AUTHORIZED: &str = "999.0000000";
static BALANCES_UNAUTHORIZED: &str = "0.0000000";
static AUTHORIZED_TO_MAINTAIN_LIABILITIES_BALANCES: &str = "0.0000000";
static AUTH_REQUIRED: &bool = &false;
static AUTH_REVOCABLE: &bool = &false;
static AUTH_IMMUTABLE: &bool = &false;
Expand Down
2 changes: 0 additions & 2 deletions stellar_rust_sdk/src/claimable_balances/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ mod tests {
static SPONSOR: &str = "GA7UL5DDCP6WR7KV5GXKXSHBMP577U7TBDBTBY33J57RZE2A37KW67JB";
static LAST_MODIFIED_LEDGER: &i64 = &9234;
static LAST_MODIFIED_TIME: &str = "2024-06-12T10:19:12Z";
static DESTINATION: &str = "GDSHZPWSL5QBQKKDQNECFPI2PF7JQUACNWG65PMFOK6G5V4QBH4CX2KH";
static PREDICATE_UNCONDITIONAL: &bool = &true;
static CLAWBACK_ENABLED: &bool = &false;
static PAGING_TOKEN: &str = "9234-00000000fe3d8209ed9662e92f0d3a5c55068e18bd5e0697c3c6db6ac4c0870c6f3e0b38";

Expand Down
11 changes: 1 addition & 10 deletions stellar_rust_sdk/src/ledgers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ pub mod prelude {

#[cfg(test)]
pub mod tests {
use std::hash::Hash;
use super::prelude::*;
use crate::{horizon_client::HorizonClient, Paginatable};
use base64::{engine::general_purpose, Engine};
Expand All @@ -107,10 +106,6 @@ pub mod tests {
static BASE_RESERVE_IN_STROOPS: i32 = 100000000;
static MAX_TX_SET_SIZE: i32 = 100;
static PROTOCOL_VERSION: i32 = 0;
static HEADER_XDR: &str = "AAAAAGPZj1Nu5o0bJ7W4nyOvUxG3Vpok+vFAOtC1K2M7B76ZuZRHr9UdXKbTKiclfOjy72YZFJUkJPVcKT5htvorm1QAAAAAZmi4RwAAAAAAAAABAAAAAKgkzRi8nXUGTSmaW1uspDvDqi8yaTgVPYwvm7XLbfAzAAAAQK2SUxHSetvm4OwtnmhA7Tob9tjNodbrCrdoaxB7z2MIKwTuwuTH8nnbmQQSJ5BbAvGzpj1Dioh+dpbLDakYwQjfP2GYBKkv20BXGS3EPddI6neK3FK8SYzoBSTAFLgRGXNSJ+05hGEpEjdoewhEaqLJsJbgyYpGLa3aVp8F3SSEAAAAAg3gtrOnZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkBfXhAAAAAGQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";

let hash = "f96c4021adc1ae496c662f4f97143e499a9548f541c64bb2401a1b1701de5150";
let prev_hash = "63d98f536ee68d1b27b5b89f23af5311b7569a24faf1403ad0b52b633b07be99";

// Initialize horizon client
let horizon_client =
Expand Down Expand Up @@ -162,10 +157,6 @@ pub mod tests {
static MAX_TX_SET_SIZE: &i32 = &100;
static PROTOCOL_VERSION: &i32 = &0;

let id = "f96c4021adc1ae496c662f4f97143e499a9548f541c64bb2401a1b1701de5150";
let hash = "f96c4021adc1ae496c662f4f97143e499a9548f541c64bb2401a1b1701de5150";
let prev_hash = "63d98f536ee68d1b27b5b89f23af5311b7569a24faf1403ad0b52b633b07be99";
let closed_at = "2024-02-06T17:32:26Z";
let closed_at_timepoint = 1718138951;

// Initialize horizon client
Expand All @@ -175,7 +166,7 @@ pub mod tests {
// construct request
let single_ledger_request = SingleLedgerRequest::new().set_sequence(2).unwrap();

let mut single_ledger_response = horizon_client
let single_ledger_response = horizon_client
.get_single_ledger(&single_ledger_request)
.await;

Expand Down
2 changes: 1 addition & 1 deletion stellar_rust_sdk/src/operations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ pub mod tests {
const ID: &str = "2314987376641";
const PAGING_TOKEN: &str = "2314987376641";
const TRANSACTION_SUCCESFULL: bool = true;
const SOURCE_ACCOUNT: &str = "GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H";;
const SOURCE_ACCOUNT: &str = "GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H";
const TYPE: &str = "create_account";
const TYPE_I: i64 = 0;
const CREATED_AT: &str = "2024-06-11T21:36:12Z";
Expand Down
6 changes: 3 additions & 3 deletions stellar_rust_sdk/src/order_book/details_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ impl Request for DetailsRequest<SellingAsset, BuyingAsset> {
}

mod tests {
use crate::models::Request;
use super::{Asset, AssetType, DetailsRequest};


#[test]
fn test_details_request() {
use crate::models::Request;
use super::{Asset, AssetType, DetailsRequest};
let details_request = DetailsRequest::new()
.set_buying_asset(AssetType::Native)
.unwrap()
Expand Down
11 changes: 3 additions & 8 deletions stellar_rust_sdk/src/order_book/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,20 @@ pub mod prelude {
}

pub mod tests {
use crate::horizon_client;
use crate::order_book::prelude::{Asset, AssetType, DetailsRequest};

#[tokio::test]
async fn get_order_bookdetails() {
use crate::horizon_client;
use crate::order_book::prelude::{Asset, AssetType, DetailsRequest};

const BIDS_N: &u32 = &6;
const BIDS_D: &u32 = &1;
const BIDS_PRICE: &str = "6.0000000";
const BIDS_AMOUNT: &str = "14.2857142";

const ASKS_N: &u32 = &7;
const ASKS_D: &u32 = &1;
const ASKS_PRICE: &str = "7.0000000";
const ASKS_AMOUNT: &str = "99.9999996";

const BASE_ASSET_TYPE: &str = "native";
const BASE_ASSET_CODE: &str = "IOM";
const BASE_ASSET_ISSUER: &str = "GCDE6MVFIOYF7YZCSVA6V7MDCFTNWMIOF5PQU3DWPH27AHNX4ERY6AKS";

const COUNTER_ASSET_TYPE: &str = "credit_alphanum4";

let horizon_client =
Expand Down
2 changes: 0 additions & 2 deletions stellar_rust_sdk/src/transactions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ pub mod test {
const MEMO_TYPE: &str = "none";
const SIGNATURE: &str = "NUHx9PZlcXQ9mq1lf1usrSTP4/gbxUqzUOQOSU/pQuy9dF7FcUF0fjEbzFECxHUcl4QEfbvyGIE029TA3DrODA==";
const VALID_AFTER: &str = "1970-01-01T00:00:00Z";
const VALID_BEFORE: &str = "2024-02-06T17:49:24Z";
const MIN_TIME: &str = "0";
const MAX_TIME: &str = "1707241764";

let horizon_client =
HorizonClient::new("https://horizon-testnet.stellar.org"
Expand Down

0 comments on commit de3e9af

Please sign in to comment.