diff --git a/Cargo.toml b/Cargo.toml index 36c9fdd1..9579e5a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,6 @@ cast = "0.3" num-traits = { version = "0.2", default-features = false, features = ["std"] } oorandom = "11.1" regex = { version = "1.10", default-features = false, features = ["std"] } -criterion-plot = { path = "plot", version = "0.5.0" } # Optional dependencies rayon = { version = "1.9", optional = true } @@ -73,6 +72,8 @@ approx = "0.5.1" quickcheck = { version = "1.0", default-features = false } rand = "0.8" futures = { version = "0.3", default-features = false, features = ["executor"] } +itertools-num = "0.1" +num-complex = "0.4.5" [features] stable = [ diff --git a/plot/.gitignore b/plot/.gitignore deleted file mode 100644 index 726c7b62..00000000 --- a/plot/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.bk -Cargo.lock -target/* diff --git a/plot/CONTRIBUTING.md b/plot/CONTRIBUTING.md deleted file mode 120000 index 44fcc634..00000000 --- a/plot/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -../CONTRIBUTING.md \ No newline at end of file diff --git a/plot/Cargo.toml b/plot/Cargo.toml deleted file mode 100644 index e93c4199..00000000 --- a/plot/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ -[package] -authors = [ - "Jorge Aparicio ", - "Brook Heisler ", -] -name = "criterion-plot" -version = "0.5.0" -edition = "2018" - -description = "Criterion's plotting library" -repository = "https://github.com/bheisler/criterion.rs" -readme = "README.md" -keywords = ["plotting", "gnuplot", "criterion"] -categories = ["visualization"] -license = "MIT OR Apache-2.0" - -[dependencies] -cast = "0.3" -itertools = ">=0.10, <=0.12" - -[dev-dependencies] -itertools-num = "0.1" -num-complex = { version = "0.4", default-features = false, features = ["std"] } -rand = "0.8" - -[badges] -maintenance = { status = "looking-for-maintainer" } diff --git a/plot/LICENSE-APACHE b/plot/LICENSE-APACHE deleted file mode 120000 index 965b606f..00000000 --- a/plot/LICENSE-APACHE +++ /dev/null @@ -1 +0,0 @@ -../LICENSE-APACHE \ No newline at end of file diff --git a/plot/LICENSE-MIT b/plot/LICENSE-MIT deleted file mode 120000 index 76219eb7..00000000 --- a/plot/LICENSE-MIT +++ /dev/null @@ -1 +0,0 @@ -../LICENSE-MIT \ No newline at end of file diff --git a/plot/README.md b/plot/README.md deleted file mode 100644 index 6c403e0a..00000000 --- a/plot/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# `criterion-plot` - -> Graphing sub-crate of [Criterion.rs]. - -This is an unstable implementation detail of [Criterion.rs]. Anything may change -at any time with no warning, including the public API. For further information, -see [Criterion.rs]. - -`criterion-plot` is currently looking for a new maintainer. See -[this thread](https://users.rust-lang.org/t/call-for-maintainers-criterion-plot/24413) for details. - -## License - -This project is licensed under either of - -* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - ([LICENSE-APACHE](LICENSE-APACHE)) - -* [MIT License](http://opensource.org/licenses/MIT) - ([LICENSE-MIT](LICENSE-MIT)) - -at your option. - -## Contributing - -We welcome all people who want to contribute. -Please see the [contributing instructions] for more information. - -Contributions in any form (issues, pull requests, etc.) to this project -must adhere to Rust's [Code of Conduct]. - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in this crate by you, as defined in the Apache-2.0 license, shall -be dual licensed as above, without any additional terms or conditions. - -[Code of Conduct]: https://www.rust-lang.org/en-US/conduct.html -[Criterion.rs]: https://github.com/bheisler/criterion.rs -[contributing instructions]: CONTRIBUTING.md diff --git a/plot/src/prelude.rs b/plot/src/prelude.rs deleted file mode 100644 index e42c45f6..00000000 --- a/plot/src/prelude.rs +++ /dev/null @@ -1,13 +0,0 @@ -//! A collection of the most used traits, structs and enums - -pub use crate::candlestick::Candlesticks; -pub use crate::curve::Curve::{Dots, Impulses, Lines, LinesPoints, Points, Steps}; -pub use crate::errorbar::ErrorBar::{XErrorBars, XErrorLines, YErrorBars, YErrorLines}; -pub use crate::filledcurve::FilledCurve; -pub use crate::key::{Boxed, Horizontal, Justification, Order, Position, Stacked, Vertical}; -pub use crate::proxy::{Font, Label, Output, Title}; -pub use crate::traits::{Configure, Plot, Set}; -pub use crate::{ - Axes, Axis, BoxWidth, Color, Figure, FontSize, Grid, Key, LineType, LineWidth, Opacity, - PointSize, PointType, Range, Scale, ScaleFactor, Size, Terminal, TicLabels, -}; diff --git a/plot/src/axis.rs b/src/criterion_plot/axis.rs similarity index 97% rename from plot/src/axis.rs rename to src/criterion_plot/axis.rs index 5f7ae494..83f751a3 100644 --- a/plot/src/axis.rs +++ b/src/criterion_plot/axis.rs @@ -3,9 +3,9 @@ use std::borrow::Cow; use std::iter::IntoIterator; -use crate::map; -use crate::traits::{Configure, Data, Set}; -use crate::{ +use super::map; +use super::traits::{Configure, Data, Set}; +use super::{ grid, Axis, Default, Display, Grid, Label, Range, Scale, ScaleFactor, Script, TicLabels, }; @@ -191,7 +191,7 @@ impl<'a> Script for (Axis, &'a Properties) { } } -impl crate::ScaleFactorTrait for Properties { +impl super::ScaleFactorTrait for Properties { fn scale_factor(&self) -> f64 { self.scale_factor } diff --git a/plot/src/candlestick.rs b/src/criterion_plot/candlestick.rs similarity index 93% rename from plot/src/candlestick.rs rename to src/criterion_plot/candlestick.rs index 921bffa8..52ef9941 100644 --- a/plot/src/candlestick.rs +++ b/src/criterion_plot/candlestick.rs @@ -5,9 +5,9 @@ use std::iter::IntoIterator; use itertools::izip; -use crate::data::Matrix; -use crate::traits::{self, Data, Set}; -use crate::{Color, Default, Display, Figure, Label, LineType, LineWidth, Plot, Script}; +use super::data::Matrix; +use super::traits::{self, Data, Set}; +use super::{Color, Default, Display, Figure, Label, LineType, LineWidth, Plot, Script}; /// Properties common to candlestick plots pub struct Properties { @@ -128,7 +128,7 @@ where where F: FnOnce(&mut Properties) -> &mut Properties, { - let (x_factor, y_factor) = crate::scale_factor(&self.axes, crate::Axes::BottomXLeftY); + let (x_factor, y_factor) = super::scale_factor(&self.axes, super::Axes::BottomXLeftY); let Candlesticks { x, whisker_min, box_min, box_high, whisker_high } = candlesticks; let data = Matrix::new( diff --git a/plot/src/curve.rs b/src/criterion_plot/curve.rs similarity index 97% rename from plot/src/curve.rs rename to src/criterion_plot/curve.rs index 92c00131..21c566cb 100644 --- a/plot/src/curve.rs +++ b/src/criterion_plot/curve.rs @@ -5,9 +5,9 @@ use std::iter::IntoIterator; use itertools::izip; -use crate::data::Matrix; -use crate::traits::{self, Data, Set}; -use crate::{ +use super::data::Matrix; +use super::traits::{self, Data, Set}; +use super::{ Axes, Color, CurveDefault, Display, Figure, Label, LineType, LineWidth, Plot, PointSize, PointType, Script, }; @@ -263,7 +263,7 @@ where configure(&mut props); let (x_factor, y_factor) = - crate::scale_factor(&self.axes, props.axes.unwrap_or(crate::Axes::BottomXLeftY)); + super::scale_factor(&self.axes, props.axes.unwrap_or(super::Axes::BottomXLeftY)); let data = Matrix::new(izip!(x, y), (x_factor, y_factor)); self.plots.push(Plot::new(data, &props)); diff --git a/plot/src/data.rs b/src/criterion_plot/data.rs similarity index 99% rename from plot/src/data.rs rename to src/criterion_plot/data.rs index 9ab92859..328f47bc 100644 --- a/plot/src/data.rs +++ b/src/criterion_plot/data.rs @@ -2,7 +2,7 @@ use std::mem; use cast::From as _0; -use crate::traits::Data; +use super::traits::Data; macro_rules! impl_data { ($($ty:ty),+) => { diff --git a/plot/src/display.rs b/src/criterion_plot/display.rs similarity index 96% rename from plot/src/display.rs rename to src/criterion_plot/display.rs index 8f6f1e13..a482aa37 100644 --- a/plot/src/display.rs +++ b/src/criterion_plot/display.rs @@ -1,7 +1,7 @@ use std::borrow::Cow; -use crate::key::{Horizontal, Justification, Order, Stacked, Vertical}; -use crate::{Axes, Axis, Color, Display, Grid, LineType, PointType, Terminal}; +use super::key::{Horizontal, Justification, Order, Stacked, Vertical}; +use super::{Axes, Axis, Color, Display, Grid, LineType, PointType, Terminal}; impl Display<&'static str> for Axis { fn display(&self) -> &'static str { diff --git a/plot/src/errorbar.rs b/src/criterion_plot/errorbar.rs similarity index 97% rename from plot/src/errorbar.rs rename to src/criterion_plot/errorbar.rs index 9265f6f2..dda19486 100644 --- a/plot/src/errorbar.rs +++ b/src/criterion_plot/errorbar.rs @@ -5,9 +5,9 @@ use std::iter::IntoIterator; use itertools::izip; -use crate::data::Matrix; -use crate::traits::{self, Data, Set}; -use crate::{ +use super::data::Matrix; +use super::traits::{self, Data, Set}; +use super::{ Color, Display, ErrorBarDefault, Figure, Label, LineType, LineWidth, Plot, PointSize, PointType, Script, }; @@ -232,7 +232,7 @@ where where F: FnOnce(&mut Properties) -> &mut Properties, { - let (x_factor, y_factor) = crate::scale_factor(&self.axes, crate::Axes::BottomXLeftY); + let (x_factor, y_factor) = super::scale_factor(&self.axes, super::Axes::BottomXLeftY); let style = e.style(); let (x, y, length, height, e_factor) = match e { diff --git a/plot/src/filledcurve.rs b/src/criterion_plot/filledcurve.rs similarity index 93% rename from plot/src/filledcurve.rs rename to src/criterion_plot/filledcurve.rs index db63eb13..bcf9c20e 100644 --- a/plot/src/filledcurve.rs +++ b/src/criterion_plot/filledcurve.rs @@ -5,9 +5,9 @@ use std::iter::IntoIterator; use itertools::izip; -use crate::data::Matrix; -use crate::traits::{self, Data, Set}; -use crate::{Axes, Color, Default, Display, Figure, Label, Opacity, Plot, Script}; +use super::data::Matrix; +use super::traits::{self, Data, Set}; +use super::{Axes, Color, Default, Display, Figure, Label, Opacity, Plot, Script}; /// Properties common to filled curve plots pub struct Properties { @@ -128,7 +128,7 @@ where configure(&mut props); let (x_factor, y_factor) = - crate::scale_factor(&self.axes, props.axes.unwrap_or(crate::Axes::BottomXLeftY)); + super::scale_factor(&self.axes, props.axes.unwrap_or(super::Axes::BottomXLeftY)); let data = Matrix::new(izip!(x, y1, y2), (x_factor, y_factor, y_factor)); self.plots.push(Plot::new(data, &props)); diff --git a/plot/src/grid.rs b/src/criterion_plot/grid.rs similarity index 95% rename from plot/src/grid.rs rename to src/criterion_plot/grid.rs index b6adb2f1..6c2e0b37 100644 --- a/plot/src/grid.rs +++ b/src/criterion_plot/grid.rs @@ -1,6 +1,6 @@ //! Gridline -use crate::{Axis, Default, Display, Grid, Script}; +use super::{Axis, Default, Display, Grid, Script}; /// Gridline properties #[derive(Clone, Copy)] diff --git a/plot/src/key.rs b/src/criterion_plot/key.rs similarity index 98% rename from plot/src/key.rs rename to src/criterion_plot/key.rs index e8847d69..f55bf4f7 100644 --- a/plot/src/key.rs +++ b/src/criterion_plot/key.rs @@ -2,8 +2,8 @@ use std::borrow::Cow; -use crate::traits::Set; -use crate::{Default, Display, Script, Title}; +use super::traits::Set; +use super::{Default, Display, Script, Title}; /// Properties of the key #[derive(Clone)] diff --git a/plot/src/map.rs b/src/criterion_plot/map.rs similarity index 98% rename from plot/src/map.rs rename to src/criterion_plot/map.rs index 92d28a9d..d0d6ca81 100644 --- a/plot/src/map.rs +++ b/src/criterion_plot/map.rs @@ -1,7 +1,7 @@ //! Enum Maps pub mod axis { - use crate::Axis; + use super::super::Axis; const LENGTH: usize = 4; @@ -79,7 +79,7 @@ pub mod axis { } pub mod grid { - use crate::Grid; + use super::super::Grid; const LENGTH: usize = 2; diff --git a/plot/src/lib.rs b/src/criterion_plot/mod.rs similarity index 97% rename from plot/src/lib.rs rename to src/criterion_plot/mod.rs index adfb5ee6..3f9e2f37 100644 --- a/plot/src/lib.rs +++ b/src/criterion_plot/mod.rs @@ -1,3 +1,4 @@ +#![allow(unused)] //! [Criterion]'s plotting library. //! //! [Criterion]: https://github.com/bheisler/criterion.rs @@ -15,9 +16,9 @@ //! # use std::fs; //! # use std::path::Path; //! use itertools_num::linspace; -//! use criterion_plot::prelude::*; +//! use criterion2::criterion_plot::prelude::*; //! -//! # if let Err(_) = criterion_plot::version() { +//! # if let Err(_) = criterion2::criterion_plot::version() { //! # return; //! # } //! let ref xs = linspace::(-10., 10., 51).collect::>(); @@ -80,7 +81,7 @@ //! //! use itertools_num::linspace; //! use rand::Rng; -//! use criterion_plot::prelude::*; +//! use criterion2::criterion_plot::prelude::*; //! //! fn sinc(mut x: f64) -> f64 { //! if x == 0. { @@ -91,7 +92,7 @@ //! } //! } //! -//! # if let Err(_) = criterion_plot::version() { +//! # if let Err(_) = criterion2::criterion_plot::version() { //! # return; //! # } //! let ref xs_ = linspace::(-4., 4., 101).collect::>(); @@ -156,10 +157,10 @@ //! ``` //! # use std::fs; //! # use std::path::Path; -//! use criterion_plot::prelude::*; +//! use criterion2::criterion_plot::prelude::*; //! use rand::Rng; //! -//! # if let Err(_) = criterion_plot::version() { +//! # if let Err(_) = criterion2::criterion_plot::version() { //! # return; //! # } //! let xs = 1..11; @@ -224,13 +225,13 @@ //! //! use itertools_num::linspace; //! use num_complex::Complex; -//! use criterion_plot::prelude::*; +//! use criterion2::criterion_plot::prelude::*; //! //! fn tf(x: f64) -> Complex { //! Complex::new(0., x) / Complex::new(10., x) / Complex::new(1., x / 10_000.) //! } //! -//! # if let Err(_) = criterion_plot::version() { +//! # if let Err(_) = criterion2::criterion_plot::version() { //! # return; //! # } //! let (start, end): (f64, f64) = (1.1, 90_000.); @@ -296,9 +297,9 @@ //! use std::iter; //! //! use itertools_num::linspace; -//! use criterion_plot::prelude::*; +//! use criterion2::criterion_plot::prelude::*; //! -//! # if let Err(_) = criterion_plot::version() { +//! # if let Err(_) = criterion2::criterion_plot::version() { //! # return; //! # } //! let (start, end) = (-5., 5.); @@ -380,8 +381,8 @@ use std::path::Path; use std::process::{Child, Command}; use std::str; -use crate::data::Matrix; -use crate::traits::{Configure, Set}; +use self::data::Matrix; +use self::traits::{Configure, Set}; mod data; mod display; @@ -767,7 +768,7 @@ pub enum Axis { impl Axis { fn next(self) -> Option { - use crate::Axis::*; + use self::Axis::*; match self { BottomX => Some(LeftY), @@ -809,7 +810,7 @@ pub enum Grid { impl Grid { fn next(self) -> Option { - use crate::Grid::*; + use self::Grid::*; match self { Major => Some(Minor), @@ -956,7 +957,7 @@ impl ::std::error::Error for VersionError { } } - fn cause(&self) -> Option<&dyn ::std::error::Error> { + fn cause(&self) -> Option<&dyn::std::error::Error> { match self { VersionError::Exec(err) => Some(err), _ => None, @@ -1000,8 +1001,8 @@ fn parse_version(version_str: &str) -> Result> { } fn scale_factor(map: &map::axis::Map, axes: Axes) -> (f64, f64) { - use crate::Axes::*; - use crate::Axis::*; + use self::Axes::*; + use self::Axis::*; match axes { BottomXLeftY => ( diff --git a/src/criterion_plot/prelude.rs b/src/criterion_plot/prelude.rs new file mode 100644 index 00000000..2964ad45 --- /dev/null +++ b/src/criterion_plot/prelude.rs @@ -0,0 +1,13 @@ +//! A collection of the most used traits, structs and enums + +pub use super::candlestick::Candlesticks; +pub use super::curve::Curve::{Dots, Impulses, Lines, LinesPoints, Points, Steps}; +pub use super::errorbar::ErrorBar::{XErrorBars, XErrorLines, YErrorBars, YErrorLines}; +pub use super::filledcurve::FilledCurve; +pub use super::key::{Boxed, Horizontal, Justification, Order, Position, Stacked, Vertical}; +pub use super::proxy::{Font, Label, Output, Title}; +pub use super::traits::{Configure, Plot, Set}; +pub use super::{ + Axes, Axis, BoxWidth, Color, Figure, FontSize, Grid, Key, LineType, LineWidth, Opacity, + PointSize, PointType, Range, Scale, ScaleFactor, Size, Terminal, TicLabels, +}; diff --git a/plot/src/proxy.rs b/src/criterion_plot/proxy.rs similarity index 94% rename from plot/src/proxy.rs rename to src/criterion_plot/proxy.rs index 401b7f92..ee228170 100644 --- a/plot/src/proxy.rs +++ b/src/criterion_plot/proxy.rs @@ -2,7 +2,7 @@ #![allow(non_snake_case)] -use crate::{Font as FontType, Label as LabelType, Output as OutputType, Title as TitleType}; +use super::{Font as FontType, Label as LabelType, Output as OutputType, Title as TitleType}; use std::borrow::Cow; use std::path::Path; diff --git a/plot/src/traits.rs b/src/criterion_plot/traits.rs similarity index 100% rename from plot/src/traits.rs rename to src/criterion_plot/traits.rs diff --git a/src/html/mod.rs b/src/html/mod.rs index 7543c1aa..c777e328 100644 --- a/src/html/mod.rs +++ b/src/html/mod.rs @@ -1,13 +1,13 @@ use crate::report::{make_filename_safe, BenchmarkId, MeasurementData, Report, ReportContext}; use crate::stats::bivariate::regression::Slope; +use crate::criterion_plot::Size; use crate::estimate::Estimate; use crate::format; use crate::fs; use crate::measurement::ValueFormatter; use crate::plot::{PlotContext, PlotData, Plotter}; use crate::SavedSample; -use criterion_plot::Size; use serde::Serialize; use std::cell::RefCell; use std::cmp::Ordering; diff --git a/src/lib.rs b/src/lib.rs index fab83a44..b30ca4b0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -49,6 +49,7 @@ pub mod async_executor; mod bencher; mod connection; mod criterion; +pub mod criterion_plot; #[cfg(feature = "csv_output")] mod csv_report; mod error; @@ -79,7 +80,7 @@ use std::process::Command; use std::sync::Mutex; use std::time::Duration; -use criterion_plot::{Version, VersionError}; +use crate::criterion_plot::{Version, VersionError}; use once_cell::sync::Lazy; use crate::benchmark::BenchmarkConfig; @@ -116,7 +117,8 @@ pub use crate::codspeed::criterion::Criterion; pub use crate::criterion::Criterion; static DEBUG_ENABLED: Lazy = Lazy::new(|| std::env::var_os("CRITERION_DEBUG").is_some()); -static GNUPLOT_VERSION: Lazy> = Lazy::new(criterion_plot::version); +static GNUPLOT_VERSION: Lazy> = + Lazy::new(crate::criterion_plot::version); static DEFAULT_PLOTTING_BACKEND: Lazy = Lazy::new(|| match &*GNUPLOT_VERSION { Ok(_) => PlottingBackend::Gnuplot, #[cfg(feature = "plotters")] diff --git a/src/plot/gnuplot_backend/distributions.rs b/src/plot/gnuplot_backend/distributions.rs index 7eb4242c..2bf4850c 100644 --- a/src/plot/gnuplot_backend/distributions.rs +++ b/src/plot/gnuplot_backend/distributions.rs @@ -1,9 +1,9 @@ use std::iter; use std::process::Child; +use crate::criterion_plot::prelude::*; use crate::stats::univariate::Sample; use crate::stats::Distribution; -use criterion_plot::prelude::*; use super::*; use crate::estimate::Estimate; diff --git a/src/plot/gnuplot_backend/iteration_times.rs b/src/plot/gnuplot_backend/iteration_times.rs index c243b646..4b37d8bc 100644 --- a/src/plot/gnuplot_backend/iteration_times.rs +++ b/src/plot/gnuplot_backend/iteration_times.rs @@ -1,6 +1,6 @@ use std::process::Child; -use criterion_plot::prelude::*; +use crate::criterion_plot::prelude::*; use super::*; use crate::report::{BenchmarkId, ComparisonData, MeasurementData, ReportContext}; diff --git a/src/plot/gnuplot_backend/mod.rs b/src/plot/gnuplot_backend/mod.rs index 63c044c7..98e03e03 100644 --- a/src/plot/gnuplot_backend/mod.rs +++ b/src/plot/gnuplot_backend/mod.rs @@ -2,8 +2,8 @@ use std::iter; use std::path::Path; use std::process::Child; +use crate::criterion_plot::prelude::*; use crate::stats::univariate::Sample; -use criterion_plot::prelude::*; mod distributions; mod iteration_times; diff --git a/src/plot/gnuplot_backend/regression.rs b/src/plot/gnuplot_backend/regression.rs index 2bc10e9c..6948a585 100644 --- a/src/plot/gnuplot_backend/regression.rs +++ b/src/plot/gnuplot_backend/regression.rs @@ -1,7 +1,7 @@ use std::process::Child; +use crate::criterion_plot::prelude::*; use crate::stats::bivariate::regression::Slope; -use criterion_plot::prelude::*; use super::*; use crate::report::{BenchmarkId, ComparisonData, MeasurementData, ReportContext}; diff --git a/src/plot/gnuplot_backend/summary.rs b/src/plot/gnuplot_backend/summary.rs index d2a0a37a..f7dffdc0 100644 --- a/src/plot/gnuplot_backend/summary.rs +++ b/src/plot/gnuplot_backend/summary.rs @@ -1,11 +1,11 @@ use super::{debug_script, gnuplot_escape}; use super::{DARK_BLUE, DEFAULT_FONT, KDE_POINTS, LINEWIDTH, POINT_SIZE, SIZE}; +use crate::criterion_plot::prelude::*; use crate::kde; use crate::measurement::ValueFormatter; use crate::report::{BenchmarkId, ValueType}; use crate::stats::univariate::Sample; use crate::AxisScale; -use criterion_plot::prelude::*; use itertools::Itertools; use std::cmp::Ordering; use std::path::{Path, PathBuf}; diff --git a/src/plot/gnuplot_backend/t_test.rs b/src/plot/gnuplot_backend/t_test.rs index ba714660..f729262a 100644 --- a/src/plot/gnuplot_backend/t_test.rs +++ b/src/plot/gnuplot_backend/t_test.rs @@ -1,7 +1,7 @@ use std::iter; use std::process::Child; -use criterion_plot::prelude::*; +use crate::criterion_plot::prelude::*; use super::*; use crate::kde; diff --git a/src/plot/mod.rs b/src/plot/mod.rs index 4bce3946..2dc401c5 100644 --- a/src/plot/mod.rs +++ b/src/plot/mod.rs @@ -30,7 +30,7 @@ pub(crate) struct PlotContext<'a> { } impl<'a> PlotContext<'a> { - pub fn size(mut self, s: Option) -> PlotContext<'a> { + pub fn size(mut self, s: Option) -> PlotContext<'a> { if let Some(s) = s { self.size = Some((s.0, s.1)); }