Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions crates/domain/src/timespan.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::error::Error;

use chrono::{DateTime, prelude::*};
use chrono_tz::Tz;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -45,21 +43,6 @@ impl TimeSpan {
}
}

#[derive(Debug)]
pub struct InvalidTimeSpanError(i64, i64);

impl Error for InvalidTimeSpanError {}

impl std::fmt::Display for InvalidTimeSpanError {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(
f,
"Provided timespan start_ts: {} and end_ts: {} is invalid. It should be between 1 hour and 40 days.",
self.0, self.1
)
}
}

#[derive(Debug)]
pub struct TimeSpanDateTime {
pub start: DateTime<Tz>,
Expand Down