Skip to content

Commit

Permalink
dep: bump csv to ~1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Théo Gaillard committed Oct 6, 2020
1 parent ed0ffb2 commit ff2b78c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -25,7 +25,7 @@ error-chain = "0.12"

[dev-dependencies]
assert_approx_eq = "1.0.0"
csv = "0.15.0"
csv = "1.1.0"
bencher = "0.1.5"
rand = "0.6.5"

Expand Down
7 changes: 2 additions & 5 deletions examples/ema.rs
@@ -1,15 +1,12 @@
extern crate csv;
extern crate ta;

use ta::indicators::ExponentialMovingAverage as Ema;
use ta::DataItem;
use ta::Next;

fn main() {
let mut ema = Ema::new(9).unwrap();
let mut reader = csv::Reader::from_file("./examples/data/AMZN.csv").unwrap();
let mut reader = csv::Reader::from_path("./examples/data/AMZN.csv").unwrap();

for record in reader.decode() {
for record in reader.deserialize() {
let (date, open, high, low, close, volume): (String, f64, f64, f64, f64, f64) =
record.unwrap();
let dt = DataItem::builder()
Expand Down

0 comments on commit ff2b78c

Please sign in to comment.