Skip to content
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 plot/src/axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ where
}
}

impl<'a> Script for (Axis, &'a Properties) {
impl Script for (Axis, &Properties) {
fn script(&self) -> String {
let &(axis, properties) = self;
let axis_ = axis.display();
Expand Down
2 changes: 1 addition & 1 deletion plot/src/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Properties {
}
}

impl<'a> Script for (Axis, Grid, &'a Properties) {
impl Script for (Axis, Grid, &Properties) {
fn script(&self) -> String {
let &(axis, grid, properties) = self;
let axis = axis.display();
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub(crate) fn common<M: Measurement, T: ?Sized>(

criterion.report.analysis(id, report_context);

if times.iter().any(|&f| f == 0.0) {
if times.contains(&0.0) {
error!(
"At least one measurement of benchmark {} took zero time per \
iteration. This should not be possible. If using iter_custom, please verify \
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ https://bheisler.github.io/criterion.rs/book/faq.html
if matches.contains_id("baseline")
|| matches
.get_one::<String>("save-baseline")
.map_or(false, |base| base != "base")
.is_some_and(|base| base != "base")
|| matches.contains_id("load-baseline")
{
eprintln!("Error: baselines are not supported when running with cargo-criterion.");
Expand Down
2 changes: 1 addition & 1 deletion src/stats/univariate/outliers/tukey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ where
}
}

impl<'a, 'b, A> IntoIterator for &'b LabeledSample<'a, A>
impl<'a, A> IntoIterator for &LabeledSample<'a, A>
where
A: Float,
{
Expand Down
4 changes: 2 additions & 2 deletions src/stats/univariate/percentiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ where
unsafe fn at_unchecked(&self, p: A) -> A {
let _100 = A::cast(100);
debug_assert!(p >= A::cast(0) && p <= _100);
debug_assert!(self.0.len() > 0);
debug_assert!(!self.0.is_empty());
let len = self.0.len() - 1;

if p == _100 {
Expand All @@ -47,7 +47,7 @@ where
let _100 = A::cast(100);

assert!(p >= _0 && p <= _100);
assert!(self.0.len() > 0);
assert!(!self.0.is_empty());

unsafe { self.at_unchecked(p) }
}
Expand Down
Loading