Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump MSRV to 1.49 as required by tokio. #561

Merged
merged 3 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
rust:
- stable
- beta
- 1.46.0 # MSRV
- 1.49.0 # MSRV

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ For more details, see the [CONTRIBUTING.md file](https://github.com/bheisler/cri
Criterion.<span></span>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.<span></span>rs may
Currently, the oldest version of Rust believed to work is 1.49. Future versions of Criterion.<span></span>rs may
break support for such old versions, and this will not be considered a breaking change. If you
require Criterion.<span></span>rs to work on old versions of Rust, you will need to stick to a
specific patch version of Criterion.<span></span>rs.
Expand Down
2 changes: 1 addition & 1 deletion plot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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."
);

Expand Down
2 changes: 1 addition & 1 deletion src/plot/gnuplot_backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
7 changes: 3 additions & 4 deletions src/plot/plotters_backend/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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;

Expand Down