Skip to content

Commit

Permalink
style(clippy): resolve issues
Browse files Browse the repository at this point in the history
  • Loading branch information
PJColombo committed Mar 8, 2024
1 parent 66c18ca commit f087bed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/clients/blobscan/jwt_manager.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::sync::{Arc, Mutex};

use chrono::{Duration, Utc};
use chrono::{Duration, TimeDelta, Utc};
use jsonwebtoken::{encode, Algorithm, EncodingKey, Header};
use serde::{Deserialize, Serialize};
use tracing::{debug, error};
Expand Down Expand Up @@ -36,7 +36,7 @@ impl JWTManager {
refresh_interval: config.refresh_interval,
safety_margin: match config.safety_magin {
Some(safety_margin) => safety_margin,
None => Duration::minutes(1),
None => TimeDelta::try_minutes(1).unwrap(),
},
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/clients/blobscan/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use backoff::ExponentialBackoff;
use chrono::TimeDelta;
use reqwest::{Client, Url};

use crate::{clients::common::ClientResult, json_get, json_put};
Expand Down Expand Up @@ -33,7 +34,7 @@ impl BlobscanClient {
let base_url = Url::parse(&format!("{}/api/", config.base_url))?;
let jwt_manager = JWTManager::new(JWTManagerConfig {
secret_key: config.secret_key,
refresh_interval: chrono::Duration::hours(1),
refresh_interval: TimeDelta::try_hours(1).unwrap(),
safety_magin: None,
});
let exp_backoff = config.exp_backoff;
Expand Down

0 comments on commit f087bed

Please sign in to comment.