diff options
| author | Joris | 2022-12-18 15:03:51 +0100 | 
|---|---|---|
| committer | Joris | 2022-12-18 15:03:51 +0100 | 
| commit | a6fd0110b65ec352603d69b9c4ccf3532689cd32 (patch) | |
| tree | f6f8694a40ce620705525f1aca67edeba3074c0b /src/gui | |
| parent | 241089e3a1427c2968b296cc6c4112e45b78c278 (diff) | |
Upgrade dependencies
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/app.rs | 5 | ||||
| -rw-r--r-- | src/gui/calendar.rs | 3 | 
2 files changed, 5 insertions, 3 deletions
| diff --git a/src/gui/app.rs b/src/gui/app.rs index 4ed864b..c0fc038 100644 --- a/src/gui/app.rs +++ b/src/gui/app.rs @@ -41,9 +41,10 @@ impl App {                  .build(),          ); -        let today = chrono::offset::Local::today().naive_utc(); +        let today = chrono::offset::Local::now().naive_utc().date(); +        // TODO: error handling          let start_date = -            NaiveDate::from_isoywd(today.year(), today.iso_week().week(), Weekday::Mon); +            NaiveDate::from_isoywd_opt(today.year(), today.iso_week().week(), Weekday::Mon).unwrap();          let end_date = start_date + Duration::days(7 * 4 - 1);          let events = db::events::list_non_recurring_between(&conn, start_date, end_date)?; diff --git a/src/gui/calendar.rs b/src/gui/calendar.rs index f5f9c10..c80efef 100644 --- a/src/gui/calendar.rs +++ b/src/gui/calendar.rs @@ -65,7 +65,8 @@ fn attach_days(                  1,                  1,              ); -            d = d.succ(); +            // TODO: error handling +            d = d.succ_opt().unwrap();          }      }  } | 
