Fix clippy lints for all crates and features
... and check those in CI as well!
This commit is contained in:
parent
d53cc5498b
commit
2065a40f64
55 changed files with 237 additions and 232 deletions
|
|
@ -280,7 +280,7 @@ mod grid {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn view<'a>(&'a mut self) -> Element<'a, Message> {
|
||||
pub fn view(&mut self) -> Element<Message> {
|
||||
Canvas::new(self)
|
||||
.width(Length::Fill)
|
||||
.height(Length::Fill)
|
||||
|
|
@ -328,7 +328,7 @@ mod grid {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> canvas::Program<Message> for Grid {
|
||||
impl canvas::Program<Message> for Grid {
|
||||
fn update(
|
||||
&mut self,
|
||||
event: Event,
|
||||
|
|
@ -826,13 +826,13 @@ struct Controls {
|
|||
}
|
||||
|
||||
impl Controls {
|
||||
fn view<'a>(
|
||||
&'a mut self,
|
||||
fn view(
|
||||
&mut self,
|
||||
is_playing: bool,
|
||||
is_grid_enabled: bool,
|
||||
speed: usize,
|
||||
preset: Preset,
|
||||
) -> Element<'a, Message> {
|
||||
) -> Element<Message> {
|
||||
let playback_controls = Row::new()
|
||||
.spacing(10)
|
||||
.push(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Preset {
|
||||
Custom,
|
||||
XKCD,
|
||||
Xkcd,
|
||||
Glider,
|
||||
SmallExploder,
|
||||
Exploder,
|
||||
|
|
@ -14,7 +14,7 @@ pub enum Preset {
|
|||
|
||||
pub static ALL: &[Preset] = &[
|
||||
Preset::Custom,
|
||||
Preset::XKCD,
|
||||
Preset::Xkcd,
|
||||
Preset::Glider,
|
||||
Preset::SmallExploder,
|
||||
Preset::Exploder,
|
||||
|
|
@ -30,7 +30,7 @@ impl Preset {
|
|||
#[rustfmt::skip]
|
||||
let cells = match self {
|
||||
Preset::Custom => vec![],
|
||||
Preset::XKCD => vec![
|
||||
Preset::Xkcd => vec![
|
||||
" xxx ",
|
||||
" x x ",
|
||||
" x x ",
|
||||
|
|
@ -116,7 +116,7 @@ impl Preset {
|
|||
|
||||
impl Default for Preset {
|
||||
fn default() -> Preset {
|
||||
Preset::XKCD
|
||||
Preset::Xkcd
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ impl std::fmt::Display for Preset {
|
|||
"{}",
|
||||
match self {
|
||||
Preset::Custom => "Custom",
|
||||
Preset::XKCD => "xkcd #2293",
|
||||
Preset::Xkcd => "xkcd #2293",
|
||||
Preset::Glider => "Glider",
|
||||
Preset::SmallExploder => "Small Exploder",
|
||||
Preset::Exploder => "Exploder",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue