Set MSRV to 1.71
This commit is contained in:
parent
213ede371b
commit
1291a48d4d
4 changed files with 45 additions and 40 deletions
|
|
@ -45,24 +45,26 @@ where
|
|||
}
|
||||
|
||||
#[allow(clippy::cast_precision_loss)]
|
||||
fn variant_button_bounds(
|
||||
&self,
|
||||
state: &LocalState,
|
||||
fn variant_button_bounds<'b>(
|
||||
&'b self,
|
||||
state: &'b LocalState,
|
||||
mut bounds: Rectangle,
|
||||
) -> impl Iterator<Item = (Entity, Rectangle)> {
|
||||
) -> Box<dyn Iterator<Item = (Entity, Rectangle)> + 'b> {
|
||||
let spacing = f32::from(self.spacing);
|
||||
|
||||
self.model
|
||||
.order
|
||||
.iter()
|
||||
.copied()
|
||||
.enumerate()
|
||||
.map(move |(_nth, key)| {
|
||||
let mut this_bounds = bounds;
|
||||
this_bounds.height = state.internal_layout[0].height;
|
||||
bounds.y += this_bounds.height + spacing;
|
||||
(key, this_bounds)
|
||||
})
|
||||
Box::new(
|
||||
self.model
|
||||
.order
|
||||
.iter()
|
||||
.copied()
|
||||
.enumerate()
|
||||
.map(move |(_nth, key)| {
|
||||
let mut this_bounds = bounds;
|
||||
this_bounds.height = state.internal_layout[0].height;
|
||||
bounds.y += this_bounds.height + spacing;
|
||||
(key, this_bounds)
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
#[allow(clippy::cast_precision_loss)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue