Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests and examples fail on macOS #13

Open
shanecelis opened this issue Dec 31, 2023 · 0 comments
Open

Tests and examples fail on macOS #13

shanecelis opened this issue Dec 31, 2023 · 0 comments

Comments

@shanecelis
Copy link

The examples with text and 4 tests fail on macOS 14.0 with an error BackendError(FontError(NoSuchFont("sans-serif", "normal")))

$cargo run --example box-plot
...
Error: BackendError(FontError(NoSuchFont("sans-serif", "normal")))
$ cargo test
warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
 --> plotters/src/coord/ranged1d/types/datetime.rs:2:14
  |
2 | use chrono::{Date, DateTime, Datelike, Duration, NaiveDate, NaiveDateTime, TimeZone, Timelike};
  |              ^^^^
  |
  = note: `#[warn(deprecated)]` on by default

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:105:33
    |
105 | impl<Z: TimeZone> TimeValue for Date<Z> {
    |                                 ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:279:43
    |
279 | impl<Z: TimeZone> AsRangedCoord for Range<Date<Z>> {
    |                                           ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:106:21
    |
106 |     type DateType = Date<Z>;
    |                     ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:107:29
    |
107 |     fn date_floor(&self) -> Date<Z> {
    |                             ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:110:28
    |
110 |     fn date_ceil(&self) -> Date<Z> {
    |                            ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:113:34
    |
113 |     fn earliest_after_date(date: Date<Z>) -> Self {
    |                                  ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:116:32
    |
116 |     fn subtract(&self, other: &Date<Z>) -> Duration {
    |                                ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:119:40
    |
119 |     fn add(&self, other: &Duration) -> Date<Z> {
    |                                        ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:133:21
    |
133 |     type DateType = Date<Z>;
    |                     ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:134:29
    |
134 |     fn date_floor(&self) -> Date<Z> {
    |                             ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:137:28
    |
137 |     fn date_ceil(&self) -> Date<Z> {
    |                            ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:144:34
    |
144 |     fn earliest_after_date(date: Date<Z>) -> DateTime<Z> {
    |                                  ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:280:37
    |
280 |     type CoordDescType = RangedDate<Date<Z>>;
    |                                     ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:281:18
    |
281 |     type Value = Date<Z>;
    |                  ^^^^

warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
  --> plotters/src/coord/ranged1d/types/datetime.rs:97:20
   |
97 |         NaiveDate::from_ymd(year, month, date)
   |                    ^^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:124:25
    |
124 |         self.timezone().ymd(year, month, date)
    |                         ^^^

warning: use of deprecated method `chrono::DateTime::<Tz>::date`: Use `date_naive()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:135:14
    |
135 |         self.date()
    |              ^^^^

warning: use of deprecated method `chrono::DateTime::<Tz>::date`: Use `date_naive()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:139:18
    |
139 |             self.date() + Duration::days(1)
    |                  ^^^^

warning: use of deprecated method `chrono::DateTime::<Tz>::date`: Use `date_naive()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:141:18
    |
141 |             self.date()
    |                  ^^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:145:14
    |
145 |         date.and_hms(0, 0, 0)
    |              ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:156:25
    |
156 |         self.timezone().ymd(year, month, date)
    |                         ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:160:14
    |
160 |         date.and_hms(0, 0, 0)
    |              ^^^^^^^

warning: use of deprecated method `chrono::NaiveDate::and_hms`: use `and_hms_opt()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:177:14
    |
177 |         date.and_hms(0, 0, 0)
    |              ^^^^^^^

warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:188:20
    |
188 |         NaiveDate::from_ymd(year, month, date)
    |                    ^^^^^^^^

warning: use of deprecated method `chrono::NaiveDate::and_hms`: use `and_hms_opt()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:192:14
    |
192 |         date.and_hms(0, 0, 0)
    |              ^^^^^^^

warning: unnecessary parentheses around block return value
   --> plotters/src/drawing/area.rs:672:33
    |
672 | ...                   (if id == 0 {
    |                       ^
...
678 | ...                   })
    |                        ^
    |
    = note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
    |
672 ~                                 if id == 0 {
673 |                                     0
  ...
677 |                                     breaks[id as usize - 1]
678 ~                                 }
    |

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1191:31
     |
1191 |         let coord: RangedDate<Date<_>> = (Utc.ymd(2019, 1, 1)..Utc.ymd(2019, 12, 31)).into();
     |                               ^^^^

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1253:31
     |
1253 |         let coord: RangedDate<Date<_>> = (start_date..end_date).into();
     |                               ^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:905:25
    |
905 |         let range = Utc.ymd(1000, 1, 1)..Utc.ymd(2999, 1, 1);
    |                         ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:905:46
    |
905 |         let range = Utc.ymd(1000, 1, 1)..Utc.ymd(2999, 1, 1);
    |                                              ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:909:42
    |
909 |         assert_eq!(ranged_coord.map(&Utc.ymd(1000, 8, 10), (0, 100)), 0);
    |                                          ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:910:42
    |
910 |         assert_eq!(ranged_coord.map(&Utc.ymd(2999, 8, 10), (0, 100)), 100);
    |                                          ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:933:25
    |
933 |         let range = Utc.ymd(2019, 1, 1)..Utc.ymd(2019, 1, 21);
    |                         ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:933:46
    |
933 |         let range = Utc.ymd(2019, 1, 1)..Utc.ymd(2019, 1, 21);
    |                                              ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:976:25
    |
976 |         let range = Utc.ymd(1000, 8, 5)..Utc.ymd(2999, 1, 1);
    |                         ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:976:46
    |
976 |         let range = Utc.ymd(1000, 8, 5)..Utc.ymd(2999, 1, 1);
    |                                              ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:979:42
    |
979 |         assert_eq!(ranged_coord.map(&Utc.ymd(1000, 8, 10), (0, 100)), 0);
    |                                          ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
   --> plotters/src/coord/ranged1d/types/datetime.rs:980:42
    |
980 |         assert_eq!(ranged_coord.map(&Utc.ymd(2999, 8, 10), (0, 100)), 100);
    |                                          ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1001:25
     |
1001 |         let range = Utc.ymd(2019, 8, 5)..Utc.ymd(2020, 1, 1);
     |                         ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1001:46
     |
1001 |         let range = Utc.ymd(2019, 8, 5)..Utc.ymd(2020, 1, 1);
     |                                              ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1009:25
     |
1009 |         let range = Utc.ymd(2019, 8, 5)..Utc.ymd(2020, 9, 1);
     |                         ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1009:46
     |
1009 |         let range = Utc.ymd(2019, 8, 5)..Utc.ymd(2020, 9, 1);
     |                                              ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1037:18
     |
1037 |             (Utc.ymd(1000, 1, 1).and_hms(0, 0, 0)..Utc.ymd(3000, 1, 1).and_hms(0, 0, 0)).into();
     |                  ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1037:34
     |
1037 |             (Utc.ymd(1000, 1, 1).and_hms(0, 0, 0)..Utc.ymd(3000, 1, 1).and_hms(0, 0, 0)).into();
     |                                  ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1037:56
     |
1037 |             (Utc.ymd(1000, 1, 1).and_hms(0, 0, 0)..Utc.ymd(3000, 1, 1).and_hms(0, 0, 0)).into();
     |                                                        ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1037:72
     |
1037 |             (Utc.ymd(1000, 1, 1).and_hms(0, 0, 0)..Utc.ymd(3000, 1, 1).and_hms(0, 0, 0)).into();
     |                                                                        ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1040:28
     |
1040 |             coord.map(&Utc.ymd(1000, 1, 1).and_hms(0, 0, 0), (0, 100)),
     |                            ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1040:44
     |
1040 |             coord.map(&Utc.ymd(1000, 1, 1).and_hms(0, 0, 0), (0, 100)),
     |                                            ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1044:28
     |
1044 |             coord.map(&Utc.ymd(3000, 1, 1).and_hms(0, 0, 0), (0, 100)),
     |                            ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1044:44
     |
1044 |             coord.map(&Utc.ymd(3000, 1, 1).and_hms(0, 0, 0), (0, 100)),
     |                                            ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1070:18
     |
1070 |             (Utc.ymd(2019, 1, 1).and_hms(0, 0, 0)..Utc.ymd(2019, 1, 11).and_hms(0, 0, 0)).into();
     |                  ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1070:34
     |
1070 |             (Utc.ymd(2019, 1, 1).and_hms(0, 0, 0)..Utc.ymd(2019, 1, 11).and_hms(0, 0, 0)).into();
     |                                  ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1070:56
     |
1070 |             (Utc.ymd(2019, 1, 1).and_hms(0, 0, 0)..Utc.ymd(2019, 1, 11).and_hms(0, 0, 0)).into();
     |                                                        ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1070:73
     |
1070 |             (Utc.ymd(2019, 1, 1).and_hms(0, 0, 0)..Utc.ymd(2019, 1, 11).and_hms(0, 0, 0)).into();
     |                                                                         ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1094:18
     |
1094 |             (Utc.ymd(2019, 1, 1).and_hms(0, 0, 0)..Utc.ymd(2019, 1, 2).and_hms(0, 0, 0)).into();
     |                  ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1094:34
     |
1094 |             (Utc.ymd(2019, 1, 1).and_hms(0, 0, 0)..Utc.ymd(2019, 1, 2).and_hms(0, 0, 0)).into();
     |                                  ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1094:56
     |
1094 |             (Utc.ymd(2019, 1, 1).and_hms(0, 0, 0)..Utc.ymd(2019, 1, 2).and_hms(0, 0, 0)).into();
     |                                                        ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1094:72
     |
1094 |             (Utc.ymd(2019, 1, 1).and_hms(0, 0, 0)..Utc.ymd(2019, 1, 2).and_hms(0, 0, 0)).into();
     |                                                                        ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1117:25
     |
1117 |         let start = Utc.ymd(2019, 1, 1).and_hms(0, 0, 0);
     |                         ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1117:41
     |
1117 |         let start = Utc.ymd(2019, 1, 1).and_hms(0, 0, 0);
     |                                         ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1191:47
     |
1191 |         let coord: RangedDate<Date<_>> = (Utc.ymd(2019, 1, 1)..Utc.ymd(2019, 12, 31)).into();
     |                                               ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1191:68
     |
1191 |         let coord: RangedDate<Date<_>> = (Utc.ymd(2019, 1, 1)..Utc.ymd(2019, 12, 31)).into();
     |                                                                    ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1193:40
     |
1193 |         assert_eq!(coord.index_of(&Utc.ymd(2019, 2, 28)), Some(31 + 28 - 1));
     |                                        ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1194:52
     |
1194 |         assert_eq!(coord.from_index(364), Some(Utc.ymd(2019, 12, 31)));
     |                                                    ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1199:27
     |
1199 |         let coord1 = (Utc.ymd(2019, 1, 10)..Utc.ymd(2019, 12, 31)).monthly();
     |                           ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1199:49
     |
1199 |         let coord1 = (Utc.ymd(2019, 1, 10)..Utc.ymd(2019, 12, 31)).monthly();
     |                                                 ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1200:27
     |
1200 |         let coord2 = (Utc.ymd(2019, 1, 10)..Utc.ymd(2020, 1, 1)).monthly();
     |                           ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1200:49
     |
1200 |         let coord2 = (Utc.ymd(2019, 1, 10)..Utc.ymd(2020, 1, 1)).monthly();
     |                                                 ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1215:27
     |
1215 |         let coord1 = (Utc.ymd(2000, 1, 10)..Utc.ymd(2019, 12, 31)).yearly();
     |                           ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1215:49
     |
1215 |         let coord1 = (Utc.ymd(2000, 1, 10)..Utc.ymd(2019, 12, 31)).yearly();
     |                                                 ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1226:30
     |
1226 |         let start_time = Utc.ymd(2021, 1, 1).and_hms(8, 0, 0);
     |                              ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1226:46
     |
1226 |         let start_time = Utc.ymd(2021, 1, 1).and_hms(8, 0, 0);
     |                                              ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1227:28
     |
1227 |         let end_time = Utc.ymd(2023, 1, 1).and_hms(8, 0, 0);
     |                            ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1227:44
     |
1227 |         let end_time = Utc.ymd(2023, 1, 1).and_hms(8, 0, 0);
     |                                            ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1228:23
     |
1228 |         let mid = Utc.ymd(2022, 1, 1).and_hms(8, 0, 0);
     |                       ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1228:39
     |
1228 |         let mid = Utc.ymd(2022, 1, 1).and_hms(8, 0, 0);
     |                                       ^^^^^^^

warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1238:37
     |
1238 |         let start_time = NaiveDate::from_ymd(2021, 1, 1).and_hms_milli(8, 0, 0, 0);
     |                                     ^^^^^^^^

warning: use of deprecated method `chrono::NaiveDate::and_hms_milli`: use `and_hms_milli_opt()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1238:58
     |
1238 |         let start_time = NaiveDate::from_ymd(2021, 1, 1).and_hms_milli(8, 0, 0, 0);
     |                                                          ^^^^^^^^^^^^^

warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1239:35
     |
1239 |         let end_time = NaiveDate::from_ymd(2023, 1, 1).and_hms_milli(8, 0, 0, 0);
     |                                   ^^^^^^^^

warning: use of deprecated method `chrono::NaiveDate::and_hms_milli`: use `and_hms_milli_opt()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1239:56
     |
1239 |         let end_time = NaiveDate::from_ymd(2023, 1, 1).and_hms_milli(8, 0, 0, 0);
     |                                                        ^^^^^^^^^^^^^

warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1240:30
     |
1240 |         let mid = NaiveDate::from_ymd(2022, 1, 1).and_hms_milli(8, 0, 0, 0);
     |                              ^^^^^^^^

warning: use of deprecated method `chrono::NaiveDate::and_hms_milli`: use `and_hms_milli_opt()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1240:51
     |
1240 |         let mid = NaiveDate::from_ymd(2022, 1, 1).and_hms_milli(8, 0, 0, 0);
     |                                                   ^^^^^^^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1250:30
     |
1250 |         let start_date = Utc.ymd(2021, 1, 1);
     |                              ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1251:28
     |
1251 |         let end_date = Utc.ymd(2023, 1, 1);
     |                            ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1252:23
     |
1252 |         let mid = Utc.ymd(2022, 1, 1);
     |                       ^^^

warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1262:37
     |
1262 |         let start_date = NaiveDate::from_ymd(2021, 1, 1);
     |                                     ^^^^^^^^

warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1263:35
     |
1263 |         let end_date = NaiveDate::from_ymd(2023, 1, 1);
     |                                   ^^^^^^^^

warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1264:30
     |
1264 |         let mid = NaiveDate::from_ymd(2022, 1, 1);
     |                              ^^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1274:30
     |
1274 |         let start_time = Utc.ymd(2021, 1, 1).and_hms(8, 0, 0);
     |                              ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1274:46
     |
1274 |         let start_time = Utc.ymd(2021, 1, 1).and_hms(8, 0, 0);
     |                                              ^^^^^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1286:30
     |
1286 |         let start_time = Utc.ymd(2021, 1, 1).and_hms(8, 0, 0);
     |                              ^^^

warning: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
    --> plotters/src/coord/ranged1d/types/datetime.rs:1286:46
     |
1286 |         let start_time = Utc.ymd(2021, 1, 1).and_hms(8, 0, 0);
     |                                              ^^^^^^^

warning: `plotters` (lib) generated 26 warnings
warning: `plotters` (lib test) generated 93 warnings (26 duplicates) (run `cargo fix --lib -p plotters --tests` to apply 1 suggestion)
warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
 --> plotters/examples/stock.rs:2:14
  |
2 | use chrono::{Date, Duration};
  |              ^^^^
  |
  = note: `#[warn(deprecated)]` on by default

warning: use of deprecated struct `chrono::Date`: Use `NaiveDate` or `DateTime<Tz>` instead
 --> plotters/examples/stock.rs:4:27
  |
4 | fn parse_time(t: &str) -> Date<Local> {
  |                           ^^^^

warning: use of deprecated method `chrono::DateTime::<Tz>::date`: Use `date_naive()` instead
 --> plotters/examples/stock.rs:8:10
  |
8 |         .date()
  |          ^^^^

warning: `plotters` (example "stock") generated 3 warnings
warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
  --> plotters/examples/slc-temp.rs:23:18
   |
23 |             (Utc.ymd(2010, 1, 1)..Utc.ymd(2018, 12, 1)).monthly(),
   |                  ^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
  --> plotters/examples/slc-temp.rs:23:39
   |
23 |             (Utc.ymd(2010, 1, 1)..Utc.ymd(2018, 12, 1)).monthly(),
   |                                       ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
  --> plotters/examples/slc-temp.rs:27:18
   |
27 |             (Utc.ymd(2010, 1, 1)..Utc.ymd(2018, 12, 1)).monthly(),
   |                  ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
  --> plotters/examples/slc-temp.rs:27:39
   |
27 |             (Utc.ymd(2010, 1, 1)..Utc.ymd(2018, 12, 1)).monthly(),
   |                                       ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
  --> plotters/examples/slc-temp.rs:45:42
   |
45 |         DATA.iter().map(|(y, m, t)| (Utc.ymd(*y, *m, 1), *t)),
   |                                          ^^^

warning: use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
  --> plotters/examples/slc-temp.rs:51:47
   |
51 |             .map(|(y, m, t)| Circle::new((Utc.ymd(*y, *m, 1), *t), 3, BLUE.filled())),
   |                                               ^^^

warning: `plotters` (example "slc-temp") generated 6 warnings
    Finished test [unoptimized + debuginfo] target(s) in 0.10s
     Running unittests src/lib.rs (target/debug/deps/plotters-fd7cefda177b26bd)

running 77 tests
test chart::builder::test::test_label_area_size ... ok
test chart::builder::test::test_margin_configure ... ok
test coord::ranged1d::combinators::group_by::test::test_group_by ... ok
test coord::ranged1d::combinators::ckps::test::test_with_key_point_method ... ok
test coord::ranged1d::combinators::ckps::test::test_with_key_points ... ok
test coord::ranged1d::combinators::logarithmic::test::regression_test_issue_143 ... ok
test coord::ranged1d::combinators::nested::test::test_nested_coord ... ok
test coord::ranged1d::combinators::partial_axis::test::test_make_partial_axis ... ok
test coord::ranged1d::combinators::linspace::test::test_float_linspace ... ok
test coord::ranged1d::combinators::linspace::test::test_rounding_methods ... ok
test coord::ranged1d::discrete::test::test_centric_coord ... ok
test coord::ranged1d::types::datetime::test::test_date_discrete ... ok
test coord::ranged1d::types::datetime::test::test_date_with_unmap ... ok
test coord::ranged1d::types::datetime::test::test_date_range_long ... ok
test coord::ranged1d::types::datetime::test::test_date_range_short ... ok
test coord::ranged1d::types::datetime::test::test_datetime_long_range ... ok
test coord::ranged1d::types::datetime::test::test_datetime_medium_range ... ok
test coord::ranged1d::types::datetime::test::test_datetime_unmap_for_nanoseconds ... ok
test coord::ranged1d::types::datetime::test::test_datetime_unmap_for_nanoseconds_small_period ... ok
test coord::ranged1d::types::datetime::test::test_datetime_short_range ... ok
test coord::ranged1d::types::datetime::test::test_datetime_nano_range ... ok
test coord::ranged1d::discrete::test::test_value_iter ... ok
test coord::ranged1d::types::datetime::test::test_datetime_with_unmap ... ok
test coord::ranged1d::types::datetime::test::test_duration_daily_range ... ok
test coord::ranged1d::types::datetime::test::test_duration_long_range ... ok
test coord::ranged1d::types::datetime::test::test_naivedate_with_unmap ... ok
test coord::ranged1d::types::datetime::test::test_monthly_date_range ... ok
test coord::ranged1d::types::datetime::test::test_monthly_discrete ... ok
test coord::ranged1d::types::datetime::test::test_yearly_discrete ... ok
test coord::ranged1d::types::datetime::test::test_naivedatetime_with_unmap ... ok
test coord::ranged1d::types::datetime::test::test_yearly_date_range ... ok
test coord::ranged1d::types::numeric::test::regression_test_issue_253_zero_sized_coord_not_hang ... ok
test coord::ranged1d::types::numeric::test::test_coord_unmap ... ok
test coord::ranged1d::types::numeric::test::regession_test_issue_358_key_points_no_hang ... ok
test coord::ranged1d::types::numeric::test::regression_test_issue_358_key_points_no_hang_2 ... ok
test coord::ranged1d::types::numeric::test::regression_test_issue_304_intmax_keypoint_no_panic ... ok
test coord::ranged1d::types::numeric::test::regression_test_issue_255_reverse_f32_coord_no_hang ... ok
test coord::ranged1d::types::numeric::test::test_coord_follows_hint ... ok
test coord::ranged1d::types::numeric::test::test_key_points ... ok
test coord::ranged1d::types::numeric::test::test_linear_coord_map ... ok
test coord::ranged1d::types::numeric::test::test_linear_coord_system ... ok
test coord::ranged1d::types::numeric::test::test_small_coord ... ok
test coord::ranged1d::types::slice::test::test_slice_range_discrete ... ok
test coord::ranged1d::types::slice::test::test_slice_range ... ok
test data::float::test::test_pretty_printing ... ok
test data::quartiles::test::test_low_inputs ... ok
test drawing::area::drawing_area_tests::test_filling ... ok
test drawing::area::drawing_area_tests::test_margin ... ok
test data::quartiles::test::test_empty_input - should panic ... ok
test drawing::area::drawing_area_tests::test_relative_shrink ... ok
test drawing::area::drawing_area_tests::test_ranges ... ok
test drawing::area::drawing_area_tests::test_relative_size ... ok
test drawing::area::drawing_area_tests::test_relative_split ... ok
test drawing::area::drawing_area_tests::test_split_evenly ... ok
test drawing::area::drawing_area_tests::test_split_horizontally ... ok
test drawing::area::drawing_area_tests::test_split_vertically ... ok
test element::basic_shapes::test_circle_element ... ok
test element::basic_shapes::test_path_element ... ok
test element::basic_shapes::test_pixel_element ... ok
test element::basic_shapes::test_polygon_element ... ok
test element::basic_shapes::test_rect_element ... ok
test element::boxplot::test::test_draw_h ... ok
test element::boxplot::test::test_draw_v ... ok
test element::errorbar::test_preserve_stroke_width ... ok
test element::pie::test::polar_coord_to_cartestian_coord ... ok
test drawing::area::drawing_area_tests::test_split_grid ... ok
test series::line_series::test::test_line_series ... ok
test style::size::test::test_relative_size ... ok
test test::from_trait_impl_rgba_color ... ok
test test::regression_test_issue_267 ... ok
test coord::ranged1d::combinators::linspace::test::test_duration_linspace ... ok
test element::pie::test::pie_calculations ... ok
test chart::context::test::test_chart_context ... FAILED
test drawing::area::drawing_area_tests::test_titled ... FAILED
test chart::context::test::test_chart_context_3d ... FAILED
test style::font::ttf::test::test_font_cache ... FAILED
test chart::builder::test::test_caption ... ok

failures:

---- chart::context::test::test_chart_context stdout ----
thread 'chart::context::test::test_chart_context' panicked at 'Create chart: BackendError(FontError(NoSuchFont("serif", "normal")))', plotters/src/chart/context.rs:153:14

---- drawing::area::drawing_area_tests::test_titled stdout ----
thread 'drawing::area::drawing_area_tests::test_titled' panicked at 'called `Result::unwrap()` on an `Err` value: BackendError(FontError(NoSuchFont("serif", "normal")))', plotters/src/drawing/area.rs:737:14

---- chart::context::test::test_chart_context_3d stdout ----
thread 'chart::context::test::test_chart_context_3d' panicked at 'Create chart: BackendError(FontError(NoSuchFont("serif", "normal")))', plotters/src/chart/context.rs:202:14

---- style::font::ttf::test::test_font_cache stdout ----
Error: NoSuchFont("serif", "normal")


failures:
    chart::context::test::test_chart_context
    chart::context::test::test_chart_context_3d
    drawing::area::drawing_area_tests::test_titled
    style::font::ttf::test::test_font_cache

test result: FAILED. 73 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s

error: test failed, to rerun pass `--lib`
``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant