Enable some warnings

This commit is contained in:
Joscha 2022-08-02 01:49:08 +02:00
parent baa49107f1
commit 00bcdddc62
8 changed files with 30 additions and 15 deletions

View file

@ -66,7 +66,7 @@ impl<I> Blocks<I> {
}
}
pub fn iter(&self) -> vec_deque::Iter<Block<I>> {
pub fn iter(&self) -> vec_deque::Iter<'_, Block<I>> {
self.blocks.iter()
}

View file

@ -48,14 +48,14 @@ impl Widget for Float {
let available = (size.width - inner_size.width) as f32;
// Biased towards the left if horizontal lands exactly on the
// boundary between two cells
inner_pos.x = (horizontal * available as f32).floor().min(available) as i32;
inner_pos.x = (horizontal * available).floor().min(available) as i32;
}
if let Some(vertical) = self.vertical {
let available = (size.height - inner_size.height) as f32;
// Biased towards the top if vertical lands exactly on the boundary
// between two cells
inner_pos.y = (vertical * available as f32).floor().min(available) as i32;
inner_pos.y = (vertical * available).floor().min(available) as i32;
}
frame.push(inner_pos, inner_size);