We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc3a1dd commit 850ce47Copy full SHA for 850ce47
crates/domain/src/timespan.rs
@@ -1,5 +1,3 @@
1
-use std::error::Error;
2
-
3
use chrono::{DateTime, prelude::*};
4
use chrono_tz::Tz;
5
use serde::{Deserialize, Serialize};
@@ -45,21 +43,6 @@ impl TimeSpan {
45
43
}
46
44
47
48
-#[derive(Debug)]
49
-pub struct InvalidTimeSpanError(i64, i64);
50
51
-impl Error for InvalidTimeSpanError {}
52
53
-impl std::fmt::Display for InvalidTimeSpanError {
54
- fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
55
- write!(
56
- f,
57
- "Provided timespan start_ts: {} and end_ts: {} is invalid. It should be between 1 hour and 40 days.",
58
- self.0, self.1
59
- )
60
- }
61
-}
62
63
#[derive(Debug)]
64
pub struct TimeSpanDateTime {
65
pub start: DateTime<Tz>,
0 commit comments