Skip to content

Commit cb71888

Browse files
committed
Fix stock example
1 parent 90ebcf3 commit cb71888

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

plotters/examples/stock.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
use chrono::{DateTime, Duration, NaiveDate};
1+
use chrono::{Duration, NaiveDate};
22
use plotters::prelude::*;
33
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()
4+
NaiveDate::parse_from_str(&format!("{} 0:0", t), "%Y-%m-%d %H:%M").unwrap()
75
}
86
const OUT_FILE_NAME: &'static str = "plotters-doc-data/stock.png";
97
fn main() -> Result<(), Box<dyn std::error::Error>> {

0 commit comments

Comments
 (0)