Skip to content

Commit

Permalink
clippy: Fix new lints. (#786)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Jul 10, 2024
1 parent f1ea31a commit 58f7ca4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions plot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
//! ```
//!
//! - error bars (based on
//! [Julia plotting tutorial](https://plot.ly/julia/error-bars/#Colored-and-Styled-Error-Bars))
//! [Julia plotting tutorial](https://plot.ly/julia/error-bars/#Colored-and-Styled-Error-Bars))
//!
//! ![Plot](error_bar.svg)
//!
Expand Down Expand Up @@ -149,7 +149,7 @@
//! ```
//!
//! - Candlesticks (based on
//! [`candlesticks.dem`](http://gnuplot.sourceforge.net/demo/candlesticks.html))
//! [`candlesticks.dem`](http://gnuplot.sourceforge.net/demo/candlesticks.html))
//!
//! ![Plot](candlesticks.svg)
//!
Expand Down Expand Up @@ -285,7 +285,7 @@
//! # }));
//! ```
//! - Filled curves (based on
//! [`transparent.dem`](http://gnuplot.sourceforge.net/demo/transparent.html))
//! [`transparent.dem`](http://gnuplot.sourceforge.net/demo/transparent.html))
//!
//! ![Plot](filled_curve.svg)
//!
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,13 @@ pub enum BenchmarkFilter {
/// Each benchmark consists of four phases:
///
/// - **Warm-up**: The routine is repeatedly executed, to let the CPU/OS/JIT/interpreter adapt to
/// the new load
/// the new load
/// - **Measurement**: The routine is repeatedly executed, and timing information is collected into
/// a sample
/// a sample
/// - **Analysis**: The sample is analyzed and distilled into meaningful statistics that get
/// reported to stdout, stored in files, and plotted
/// reported to stdout, stored in files, and plotted
/// - **Comparison**: The current sample is compared with the sample obtained in the previous
/// benchmark.
/// benchmark.
pub struct Criterion<M: Measurement = WallTime> {
config: BenchmarkConfig,
filter: BenchmarkFilter,
Expand Down
2 changes: 1 addition & 1 deletion src/plot/gnuplot_backend/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub fn line_comparison(
let max = all_curves
.iter()
.map(|&(_, data)| Sample::new(data).mean())
.fold(::std::f64::NAN, f64::max);
.fold(f64::NAN, f64::max);

let mut dummy = [1.0];
let unit = formatter.scale_values(max, &mut dummy);
Expand Down
2 changes: 1 addition & 1 deletion src/plot/plotters_backend/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fn line_comparison_series_data<'a>(
let max = all_curves
.iter()
.map(|&(_, data)| Sample::new(data).mean())
.fold(::std::f64::NAN, f64::max);
.fold(f64::NAN, f64::max);

let mut dummy = [1.0];
let unit = formatter.scale_values(max, &mut dummy);
Expand Down
2 changes: 1 addition & 1 deletion src/stats/univariate/resamples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ where
}

if let Some(ref v) = self.stage {
unsafe { mem::transmute::<&[_], _>(v) }
unsafe { mem::transmute::<&[A], &Sample<A>>(v) }
} else {
unreachable!();
}
Expand Down

0 comments on commit 58f7ca4

Please sign in to comment.