Skip to content

Commit bbab087

Browse files
committed
refactor: switch away from v_utils::prelude in one place
1 parent ff35793 commit bbab087

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ thiserror = "^2.0.17"
3737
tokio = { version = "^1.48.0", features = ["sync", "macros", "io-util", "rt", "rt-multi-thread", "time"] } # enable only features that play with wasm.
3838
tracing = "^0.1.41"
3939
url = "^2.5.7"
40-
v_utils = { version = "^2.7.5", path = "../v_utils/v_utils" } #ga: rm path
40+
v_utils = { version = "^2.9.8", path = "../v_utils/v_utils" } #ga: rm path
4141
#dynosaur = "^0.2.0"
4242

4343
#[dev-dependencies]

examples/binance/market_perp.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ async fn main() {
99
let mut binance = ExchangeName::Binance.init_client();
1010
let symbol = Symbol::from_str("BTC-USDT.P").unwrap();
1111
binance.set_max_tries(3);
12+
binance.set_timeout(Duration::from_secs(10)); // Increase timeout for large responses like exchange_info
1213

1314
let exchange_info = binance.exchange_info(symbol.instrument, None).await.unwrap();
1415
dbg!(&exchange_info.pairs.iter().take(2).collect::<Vec<_>>());

v_exchanges_api_generics/src/http.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
use std::{fmt::Debug, path::PathBuf, sync::OnceLock, time::Duration};
22

33
pub use bytes::Bytes;
4+
use eyre::{Report, eyre};
45
use jiff::Timestamp;
56
use reqwest::Url;
67
pub use reqwest::{
78
Method, Request, RequestBuilder, StatusCode,
89
header::{self, HeaderMap},
910
};
10-
use v_utils::{prelude::*, xdg_cache_dir};
11+
use serde::Serialize;
12+
use tracing::{Span, debug, error, field::Empty, info, instrument, warn};
1113

1214
use crate::{AuthError, UrlError};
1315

@@ -326,7 +328,7 @@ pub enum BuildError {
326328

327329
static TEST_CALLS_PATH: OnceLock<PathBuf> = OnceLock::new();
328330
fn test_calls_path<Q: Serialize>(url: &Url, query: &Option<Q>) -> PathBuf {
329-
let base = TEST_CALLS_PATH.get_or_init(|| xdg_cache_dir!("test_calls"));
331+
let base = TEST_CALLS_PATH.get_or_init(|| v_utils::xdg_cache_dir!("test_calls"));
330332

331333
let mut filename = url.to_string();
332334
if query.is_some() {

0 commit comments

Comments
 (0)