Closed kennethlove closed 7 months ago
@kennethlove FWIW, this is what I get from running cargo run
to build 13_calr
(commit e977e5b1412bb3cd20737465d61f0baca05536d3) using Rust 1.74.1:
$ cargo run
warning: use of deprecated associated function `chrono::Local::today`: use `Local::now()` instead
--> src\lib.rs:64:24
|
64 | let today = Local::today();
| ^^^^^
|
= note: `#[warn(deprecated)]` on by default
warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
--> src\lib.rs:176:16
|
176 | NaiveDate::from_ymd(y, m, 1).pred()
| ^^^^^^^^
warning: use of deprecated method `chrono::NaiveDate::pred`: use `pred_opt()` instead
--> src\lib.rs:176:34
|
176 | NaiveDate::from_ymd(y, m, 1).pred()
| ^^^^
warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
--> src\lib.rs:186:28
|
186 | let first = NaiveDate::from_ymd(year, month, 1);
| ^^^^^^^^
warning: `calr` (lib) generated 4 warnings
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `target\debug\calr.exe`
February 2024
Su Mo Tu We Th Fr Sa
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29
It doesn't show well here, but the 6
has an inverted terminal foreground/background color to highlight it.
Yeah, ignore me :D A stray semicolon.
https://github.com/kyclark/command-line-rust/blob/e977e5b1412bb3cd20737465d61f0baca05536d3/13_calr/src/lib.rs#L98
This line currently fails with an error message like: