diff options
| -rw-r--r-- | src/lib.rs | 3 | ||||
| -rw-r--r-- | src/solar.rs | 2 |
2 files changed, 2 insertions, 3 deletions
@@ -41,9 +41,8 @@ async fn fetch(req: Request, env: Env, _ctx: Context) -> Result<Response> { (l, dateparse(l).map(|c| { let (m, d, y) = c; let y = y + 2000; - let s = solar(y, m, d); let (dowc, dowl) = dow(y, m, d); - let (y, m, d, t) = (s.year, s.month, s.day, s.term); + let (y, m, d, t) = solar(y, m, d); let href = l.replace('/', "_"); html! { (PreEscaped("</pre>")) diff --git a/src/solar.rs b/src/solar.rs index 37bf32b..b8e146b 100644 --- a/src/solar.rs +++ b/src/solar.rs @@ -168,7 +168,7 @@ where { let (a, to, zero) = (a.as_(), to.as_(), zero.as_()); let tmp = a + (to - zero); - (tmp - to * isize::from(tmp >= to)) as usize + (tmp - to * isize::from(tmp >= to)).cast_unsigned() } #[inline(always)] |
