Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoniosBarotsis committed Feb 25, 2025
1 parent 0331601 commit abc7ab5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ pub struct Config {
pub(crate) base_url: Url,
pub(crate) client: Client,
#[cfg(not(feature = "blocking"))]
limiter: Arc<RateLimiter<NotKeyed, InMemoryState, MonotonicClock, NoOpMiddleware<<MonotonicClock as governor::clock::Clock>::Instant>>>,
limiter: Arc<
RateLimiter<
NotKeyed,
InMemoryState,
MonotonicClock,
NoOpMiddleware<<MonotonicClock as governor::clock::Clock>::Instant>,
>,
>,
}

impl Config {
Expand Down
10 changes: 8 additions & 2 deletions src/emails.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,10 @@ mod test {
.parse::<Timestamp>()
.expect("Valid timestamp");
let time_delta = (time - Timestamp::now()).round(jiff::Unit::Hour).unwrap();
assert_eq!(time_delta.compare(Span::new().hours(1)).unwrap(), std::cmp::Ordering::Equal);
assert_eq!(
time_delta.compare(Span::new().hours(1)).unwrap(),
std::cmp::Ordering::Equal
);

// Update
let changes = UpdateEmailOptions::new().with_scheduled_at(&now_plus_2h);
Expand All @@ -641,7 +644,10 @@ mod test {
.parse::<Timestamp>()
.expect("Valid timestamp");
let time_delta = (time - Timestamp::now()).round(jiff::Unit::Hour).unwrap();
assert_eq!(time_delta.compare(Span::new().hours(2)).unwrap(), std::cmp::Ordering::Equal);
assert_eq!(
time_delta.compare(Span::new().hours(2)).unwrap(),
std::cmp::Ordering::Equal
);

// Cancel
let _cancelled = resend.emails.cancel(&email.id).await?;
Expand Down

0 comments on commit abc7ab5

Please sign in to comment.