parsers: Change deprecated FixedOffset::{east,west} for *_opt

For the second call, the doc says that None is returned when secs is
out-of-bound. It looks like it should be alright to unwrap here

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-11-22 18:59:09 +01:00
commit 6d98ad97cd
No known key found for this signature in database
GPG key ID: DEDA74AEECA9D0F2
2 changed files with 10 additions and 6 deletions

View file

@ -73,7 +73,7 @@ mod tests {
assert_eq!(date.0.minute(), 08);
assert_eq!(date.0.second(), 25);
assert_eq!(date.0.nanosecond(), 0);
assert_eq!(date.0.timezone(), FixedOffset::east(0));
assert_eq!(date.0.timezone(), FixedOffset::east_opt(0).unwrap());
}
#[test]