Skip to content

Commit bbb52cf

Browse files
committed
more clippy
1 parent 347912f commit bbb52cf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

invrs/src/tasks/eval.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ impl Eval {
986986
.y_label_area_size(40)
987987
.margin(10)
988988
.margin_top(40)
989-
.build_cartesian_2d(x_min..x_max as f64, 0f64..y_max)
989+
.build_cartesian_2d(x_min..x_max, 0f64..y_max)
990990
.unwrap();
991991

992992
chart
@@ -1065,7 +1065,7 @@ impl Eval {
10651065
let mut bar = Rectangle::new(
10661066
[
10671067
(x_orig + x as f64, 0 as f64),
1068-
(x_orig + x as f64 + 1.0, this_y as f64),
1068+
(x_orig + x as f64 + 1.0, this_y),
10691069
],
10701070
bar_style,
10711071
);
@@ -1074,20 +1074,20 @@ impl Eval {
10741074
}))
10751075
.unwrap();
10761076

1077-
let x_axis_range = 0.0..x_max as f64;
1077+
let x_axis_range = 0.0..x_max;
10781078
let margin_units: f64 =
10791079
margin_px as f64 * (x_axis_range.end - x_axis_range.start) / chart_width_px as f64;
10801080

10811081
// Draw solid lines arround bars
10821082
chart
10831083
.draw_series((0..).zip(workflow_data.iter()).map(|(x, (_, y))| {
1084-
let this_y = (y / y_ref) as f64;
1084+
let this_y = y / y_ref;
10851085
PathElement::new(
10861086
vec![
10871087
(x_orig + x as f64 + margin_units, 0.0),
10881088
(x_orig + x as f64 + 1.0 - margin_units, 0.0),
1089-
(x_orig + x as f64 + 1.0 - margin_units, this_y as f64),
1090-
(x_orig + x as f64 + margin_units, this_y as f64),
1089+
(x_orig + x as f64 + 1.0 - margin_units, this_y),
1090+
(x_orig + x as f64 + margin_units, this_y),
10911091
(x_orig + x as f64 + margin_units, 0.0),
10921092
],
10931093
BLACK,
@@ -1096,7 +1096,7 @@ impl Eval {
10961096
.unwrap();
10971097

10981098
for (x, (_baseline, y)) in (0..).zip(workflow_data.iter()) {
1099-
let this_y = (y / y_ref) as f64;
1099+
let this_y = y / y_ref;
11001100

11011101
// Add text for bars that overflow
11021102
let y_offset = match plot_version {
@@ -1137,7 +1137,7 @@ impl Eval {
11371137
.plotting_area()
11381138
.draw(&Text::new(
11391139
format!("{:.1}", this_y),
1140-
(x_orig + x as f64, (y_max + y_offset) as f64),
1140+
(x_orig + x as f64, y_max + y_offset),
11411141
("sans-serif", FONT_SIZE - 2)
11421142
.into_font()
11431143
.transform(FontTransform::Rotate270),

0 commit comments

Comments
 (0)