clippy++
This commit is contained in:
@ -17,7 +17,7 @@ pub trait Select<'a> {
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct LinearCoordView {
|
||||
pub struct LinearCoordView {
|
||||
rect: Rectangle<Virtual>,
|
||||
idx: usize,
|
||||
}
|
||||
@ -165,17 +165,17 @@ impl<const STRIDE_NUM: usize> StrideMapping<STRIDE_NUM> {
|
||||
physical_idx += length as usize;
|
||||
size = Some(match size.take() {
|
||||
None => Rectangle::new(
|
||||
Coordinates::new(x.into(), y.into()),
|
||||
Coordinates::new(x.into(), (y + length - 1).into()),
|
||||
Coordinates::new(x, y),
|
||||
Coordinates::new(x, (y + length - 1)),
|
||||
),
|
||||
Some(s) => Rectangle::new(
|
||||
Coordinates::new(
|
||||
min(s.top_left.x, x.into()),
|
||||
min(s.top_left.y, y.into())
|
||||
min(s.top_left.x, x),
|
||||
min(s.top_left.y, y)
|
||||
),
|
||||
Coordinates::new(
|
||||
max(s.bottom_right.x, x.into()),
|
||||
max(s.bottom_right.y, (y + length - 1).into())
|
||||
max(s.bottom_right.x, x),
|
||||
max(s.bottom_right.y, (y + length - 1))
|
||||
)
|
||||
)
|
||||
});
|
||||
@ -260,7 +260,7 @@ impl<'a> StrideView<'a> {
|
||||
map,
|
||||
range,
|
||||
step_size,
|
||||
cur: range.top_left.clone()
|
||||
cur: range.top_left
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -289,7 +289,7 @@ impl<'a> CoordinateView<'a> for StrideView<'a> {
|
||||
debug_assert!(self.cur.y <= cur_stride.y + cur_stride.length - 1, "coords={:?} out of bounds for stride={:?} view={:?}", self.cur, cur_stride, self);
|
||||
|
||||
// Move to the next coord and return
|
||||
let physical_coords = self.cur.clone();
|
||||
let physical_coords = self.cur;
|
||||
self.cur.y += 1;
|
||||
|
||||
let virtual_coords = VirtualCoordinates::new(
|
||||
|
Reference in New Issue
Block a user