From fe60405b3e63d60b5b2de730b33ba6cbb084df32 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 26 Jul 2024 00:20:59 +0700 Subject: [PATCH] deps: Update upper bound on itertools to 0.13 Also, remove uses of `#[macro_use]` and `extern crate` with `itertools`. --- Cargo.toml | 2 +- plot/Cargo.toml | 2 +- plot/src/candlestick.rs | 2 +- plot/src/curve.rs | 2 +- plot/src/errorbar.rs | 2 +- plot/src/filledcurve.rs | 2 +- plot/src/lib.rs | 2 -- 7 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cea0bc3d..a1a53067 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ exclude = ["book/*"] anes = "0.1.4" once_cell = "1.14" criterion-plot = { path = "plot", version = "0.5.0" } -itertools = ">=0.10, <=0.12" +itertools = ">=0.10, <=0.13" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" ciborium = "0.2.0" diff --git a/plot/Cargo.toml b/plot/Cargo.toml index 58dd1b3e..c0fd10f0 100644 --- a/plot/Cargo.toml +++ b/plot/Cargo.toml @@ -13,7 +13,7 @@ license = "MIT OR Apache-2.0" [dependencies] cast = "0.3" -itertools = ">=0.10, <=0.12" +itertools = ">=0.10, <=0.13" [dev-dependencies] itertools-num = "0.1" diff --git a/plot/src/candlestick.rs b/plot/src/candlestick.rs index ff2c0be0..2d861476 100644 --- a/plot/src/candlestick.rs +++ b/plot/src/candlestick.rs @@ -140,7 +140,7 @@ where } = candlesticks; let data = Matrix::new( - izip!(x, box_min, whisker_min, whisker_high, box_high), + itertools::izip!(x, box_min, whisker_min, whisker_high, box_high), (x_factor, y_factor, y_factor, y_factor, y_factor), ); self.plots diff --git a/plot/src/curve.rs b/plot/src/curve.rs index 3c2b68ae..39fef4b9 100644 --- a/plot/src/curve.rs +++ b/plot/src/curve.rs @@ -262,7 +262,7 @@ where let (x_factor, y_factor) = crate::scale_factor(&self.axes, props.axes.unwrap_or(crate::Axes::BottomXLeftY)); - let data = Matrix::new(izip!(x, y), (x_factor, y_factor)); + let data = Matrix::new(itertools::izip!(x, y), (x_factor, y_factor)); self.plots.push(Plot::new(data, &props)); self } diff --git a/plot/src/errorbar.rs b/plot/src/errorbar.rs index e8c73a67..9a33f50e 100644 --- a/plot/src/errorbar.rs +++ b/plot/src/errorbar.rs @@ -259,7 +259,7 @@ where } => (x, y, y_low, y_high, y_factor), }; let data = Matrix::new( - izip!(x, y, length, height), + itertools::izip!(x, y, length, height), (x_factor, y_factor, e_factor, e_factor), ); self.plots.push(Plot::new( diff --git a/plot/src/filledcurve.rs b/plot/src/filledcurve.rs index bc54082e..dea74e1d 100644 --- a/plot/src/filledcurve.rs +++ b/plot/src/filledcurve.rs @@ -132,7 +132,7 @@ where let (x_factor, y_factor) = crate::scale_factor(&self.axes, props.axes.unwrap_or(crate::Axes::BottomXLeftY)); - let data = Matrix::new(izip!(x, y1, y2), (x_factor, y_factor, y_factor)); + let data = Matrix::new(itertools::izip!(x, y1, y2), (x_factor, y_factor, y_factor)); self.plots.push(Plot::new(data, &props)); self } diff --git a/plot/src/lib.rs b/plot/src/lib.rs index c4953c2f..a948defb 100644 --- a/plot/src/lib.rs +++ b/plot/src/lib.rs @@ -372,8 +372,6 @@ #![allow(clippy::many_single_char_names)] extern crate cast; -#[macro_use] -extern crate itertools; use std::borrow::Cow; use std::fmt;