We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90ebcf3 commit cb71888Copy full SHA for cb71888
plotters/examples/stock.rs
@@ -1,9 +1,7 @@
1
-use chrono::{DateTime, Duration, NaiveDate};
+use chrono::{Duration, NaiveDate};
2
use plotters::prelude::*;
3
fn parse_time(t: &str) -> NaiveDate {
4
- DateTime::parse_from_str(&format!("{} 0:0", t), "%Y-%m-%d %H:%M")
5
- .unwrap()
6
- .date_naive()
+ NaiveDate::parse_from_str(&format!("{} 0:0", t), "%Y-%m-%d %H:%M").unwrap()
7
}
8
const OUT_FILE_NAME: &'static str = "plotters-doc-data/stock.png";
9
fn main() -> Result<(), Box<dyn std::error::Error>> {
0 commit comments