diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bb8d74fa8..17f206370 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,7 @@ jobs: rust: - stable - beta - - 1.46.0 # MSRV + - 1.49.0 # MSRV steps: - uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 781699f03..70d806c74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- MSRV bumped to 1.49 ## [0.3.5] - 2021-07-26 ### Fixed diff --git a/README.md b/README.md index 0d12aa981..2f5262e19 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ For more details, see the [CONTRIBUTING.md file](https://github.com/bheisler/cri Criterion.rs supports the last three stable minor releases of Rust. At time of writing, this means Rust 1.50 or later. Older versions may work, but are not guaranteed. -Currently, the oldest version of Rust believed to work is 1.46. Future versions of Criterion.rs may +Currently, the oldest version of Rust believed to work is 1.49. Future versions of Criterion.rs may break support for such old versions, and this will not be considered a breaking change. If you require Criterion.rs to work on old versions of Rust, you will need to stick to a specific patch version of Criterion.rs. diff --git a/plot/src/lib.rs b/plot/src/lib.rs index 151f01924..0ba04dc89 100644 --- a/plot/src/lib.rs +++ b/plot/src/lib.rs @@ -443,7 +443,7 @@ impl Figure { s.push_str(&format!( "set output '{}'\n", - self.output.display().to_string().replace("'", "''") + self.output.display().to_string().replace('\'', "''") )); if let Some(width) = self.box_width { diff --git a/src/connection.rs b/src/connection.rs index 2edc40262..0adf20f7b 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -71,8 +71,9 @@ impl InnerConnection { // read the runner-hello let mut hello_buf = [0u8; RUNNER_HELLO_SIZE]; socket.read_exact(&mut hello_buf)?; - assert!( - !(&hello_buf[0..RUNNER_MAGIC_NUMBER.len()] != RUNNER_MAGIC_NUMBER.as_bytes()), + assert_eq!( + &hello_buf[0..RUNNER_MAGIC_NUMBER.len()], + RUNNER_MAGIC_NUMBER.as_bytes(), "Not connected to cargo-criterion." ); diff --git a/src/plot/gnuplot_backend/mod.rs b/src/plot/gnuplot_backend/mod.rs index 95e07efce..987e324c4 100644 --- a/src/plot/gnuplot_backend/mod.rs +++ b/src/plot/gnuplot_backend/mod.rs @@ -26,7 +26,7 @@ use super::{PlotContext, PlotData, Plotter}; use crate::format; fn gnuplot_escape(string: &str) -> String { - string.replace("_", "\\_").replace("'", "''") + string.replace('_', "\\_").replace('\'', "''") } static DEFAULT_FONT: &str = "Helvetica"; diff --git a/src/plot/plotters_backend/summary.rs b/src/plot/plotters_backend/summary.rs index dad8a5bfa..d967828aa 100644 --- a/src/plot/plotters_backend/summary.rs +++ b/src/plot/plotters_backend/summary.rs @@ -31,9 +31,9 @@ pub fn line_comparison( let (unit, series_data) = line_comparison_series_data(formatter, all_curves); let x_range = - plotters::data::fitting_range(series_data.iter().map(|(_, xs, _)| xs.iter()).flatten()); + plotters::data::fitting_range(series_data.iter().flat_map(|(_, xs, _)| xs.iter())); let y_range = - plotters::data::fitting_range(series_data.iter().map(|(_, _, ys)| ys.iter()).flatten()); + plotters::data::fitting_range(series_data.iter().flat_map(|(_, _, ys)| ys.iter())); let root_area = SVGBackend::new(&path, SIZE) .into_drawing_area() .titled(&format!("{}: Comparison", title), (DEFAULT_FONT, 20)) @@ -196,8 +196,7 @@ pub fn violin( formatter.scale_values(max, xs); }); - let mut x_range = - plotters::data::fitting_range(kdes.iter().map(|(_, xs, _)| xs.iter()).flatten()); + let mut x_range = plotters::data::fitting_range(kdes.iter().flat_map(|(_, xs, _)| xs.iter())); x_range.start = 0.0; let y_range = -0.5..all_curves.len() as f64 - 0.5;