Address Clippy lints
This commit is contained in:
parent
e053e25d2c
commit
15f794b7a8
43 changed files with 147 additions and 172 deletions
|
|
@ -74,7 +74,7 @@ impl Path {
|
|||
pub(super) fn dashed(path: &Path, line_dash: LineDash<'_>) -> Path {
|
||||
Path::new(|builder| {
|
||||
let segments_odd = (line_dash.segments.len() % 2 == 1).then(|| {
|
||||
[&line_dash.segments[..], &line_dash.segments[..]].concat()
|
||||
[line_dash.segments, line_dash.segments].concat()
|
||||
});
|
||||
|
||||
let mut draw_line = false;
|
||||
|
|
@ -103,8 +103,7 @@ pub(super) fn dashed(path: &Path, line_dash: LineDash<'_>) -> Path {
|
|||
},
|
||||
index: line_dash.offset,
|
||||
intervals: segments_odd
|
||||
.as_ref()
|
||||
.map(Vec::as_slice)
|
||||
.as_deref()
|
||||
.unwrap_or(line_dash.segments),
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ impl Builder {
|
|||
let _ = self.raw.line_to(a);
|
||||
}
|
||||
|
||||
let _ = self.raw.arc_to(
|
||||
self.raw.arc_to(
|
||||
math::Vector::new(radius, radius),
|
||||
math::Angle::radians(0.0),
|
||||
path::ArcFlags::default(),
|
||||
|
|
|
|||
|
|
@ -67,10 +67,7 @@ where
|
|||
let side_length = (self.state.width + 2 * QUIET_ZONE) as f32
|
||||
* f32::from(self.cell_size);
|
||||
|
||||
layout::Node::new(Size::new(
|
||||
f32::from(side_length),
|
||||
f32::from(side_length),
|
||||
))
|
||||
layout::Node::new(Size::new(side_length, side_length))
|
||||
}
|
||||
|
||||
fn draw(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue