summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalte Brandy <malte.brandy@maralorn.de>2018-05-28 20:23:00 +0200
committerMalte Brandy <malte.brandy@maralorn.de>2018-05-28 20:23:00 +0200
commit80e707e35899e9ee6d2c123b9610e51da7630842 (patch)
tree24d05b069ad65d7d592d9dbe8d7f574f3deb7bd1
parent0aa56d217c4fcf8d590893fd674b27d26d55b038 (diff)
Replace wrong variable in error output of sub_from_moment
-rw-r--r--src/timetype.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/timetype.rs b/src/timetype.rs
index 7534b8d..8d12226 100644
--- a/src/timetype.rs
+++ b/src/timetype.rs
@@ -1079,7 +1079,7 @@ fn sub_from_moment(mom: NaiveDateTime, tt: TimeType) -> Result<TimeType> {
let tt = NaiveDate::from_ymd_opt(y as i32, mo as u32, d as u32)
.and_then(|nd| nd.and_hms_opt(h as u32, mi as u32, s as u32))
- .ok_or(KEK::OutOfBounds(y as i32, mo as u32, h as u32, h as u32, mi as u32, s as u32).into())
+ .ok_or(KEK::OutOfBounds(y as i32, mo as u32, d as u32, h as u32, mi as u32, s as u32).into())
.map_err(KE::from_kind)?;
Ok(TimeType::moment(tt))
},
@@ -1095,7 +1095,7 @@ fn sub_from_moment(mom: NaiveDateTime, tt: TimeType) -> Result<TimeType> {
let tt = NaiveDate::from_ymd_opt(y as i32, mo as u32, d as u32)
.and_then(|nd| nd.and_hms_opt(h as u32, mi as u32, s as u32))
- .ok_or(KEK::OutOfBounds(y as i32, mo as u32, h as u32, h as u32, mi as u32, s as u32).into())
+ .ok_or(KEK::OutOfBounds(y as i32, mo as u32, d as u32, h as u32, mi as u32, s as u32).into())
.map_err(KE::from_kind)?;
Ok(TimeType::moment(tt))
},
@@ -1111,7 +1111,7 @@ fn sub_from_moment(mom: NaiveDateTime, tt: TimeType) -> Result<TimeType> {
let tt = NaiveDate::from_ymd_opt(y as i32, mo as u32, d as u32)
.and_then(|nd| nd.and_hms_opt(h as u32, mi as u32, s as u32))
- .ok_or(KEK::OutOfBounds(y as i32, mo as u32, h as u32, h as u32, mi as u32, s as u32).into())
+ .ok_or(KEK::OutOfBounds(y as i32, mo as u32, d as u32, h as u32, mi as u32, s as u32).into())
.map_err(KE::from_kind)?;
Ok(TimeType::moment(tt))
},
@@ -1127,7 +1127,7 @@ fn sub_from_moment(mom: NaiveDateTime, tt: TimeType) -> Result<TimeType> {
let tt = NaiveDate::from_ymd_opt(y as i32, mo as u32, d as u32)
.and_then(|nd| nd.and_hms_opt(h as u32, mi as u32, s as u32))
- .ok_or(KEK::OutOfBounds(y as i32, mo as u32, h as u32, h as u32, mi as u32, s as u32).into())
+ .ok_or(KEK::OutOfBounds(y as i32, mo as u32, d as u32, h as u32, mi as u32, s as u32).into())
.map_err(KE::from_kind)?;
Ok(TimeType::moment(tt))
},
@@ -1143,7 +1143,7 @@ fn sub_from_moment(mom: NaiveDateTime, tt: TimeType) -> Result<TimeType> {
let tt = NaiveDate::from_ymd_opt(y as i32, mo as u32, d as u32)
.and_then(|nd| nd.and_hms_opt(h as u32, mi as u32, s as u32))
- .ok_or(KEK::OutOfBounds(y as i32, mo as u32, h as u32, h as u32, mi as u32, s as u32).into())
+ .ok_or(KEK::OutOfBounds(y as i32, mo as u32, d as u32, h as u32, mi as u32, s as u32).into())
.map_err(KE::from_kind)?;
Ok(TimeType::moment(tt))
},
@@ -1159,7 +1159,7 @@ fn sub_from_moment(mom: NaiveDateTime, tt: TimeType) -> Result<TimeType> {
let tt = NaiveDate::from_ymd_opt(y as i32, mo as u32, d as u32)
.and_then(|nd| nd.and_hms_opt(h as u32, mi as u32, s as u32))
- .ok_or(KEK::OutOfBounds(y as i32, mo as u32, h as u32, h as u32, mi as u32, s as u32).into())
+ .ok_or(KEK::OutOfBounds(y as i32, mo as u32, d as u32, h as u32, mi as u32, s as u32).into())
.map_err(KE::from_kind)?;
Ok(TimeType::moment(tt))
},