Merge pull request #2092 from nyurik/clippy
Chore: Apply some minor clippy fixes
This commit is contained in:
commit
e8b01eb543
7 changed files with 13 additions and 19 deletions
|
|
@ -94,7 +94,7 @@ impl Linear {
|
||||||
mut self,
|
mut self,
|
||||||
stops: impl IntoIterator<Item = ColorStop>,
|
stops: impl IntoIterator<Item = ColorStop>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
for stop in stops.into_iter() {
|
for stop in stops {
|
||||||
self = self.add_stop(stop.offset, stop.color)
|
self = self.add_stop(stop.offset, stop.color)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -220,9 +220,9 @@ where
|
||||||
size,
|
size,
|
||||||
line_height,
|
line_height,
|
||||||
font,
|
font,
|
||||||
shaping,
|
|
||||||
horizontal_alignment,
|
horizontal_alignment,
|
||||||
vertical_alignment,
|
vertical_alignment,
|
||||||
|
shaping,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -792,7 +792,7 @@ mod grid {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (cell, amount) in adjacent_life.iter() {
|
for (cell, amount) in &adjacent_life {
|
||||||
match amount {
|
match amount {
|
||||||
2 => {}
|
2 => {}
|
||||||
3 => {
|
3 => {
|
||||||
|
|
|
||||||
|
|
@ -482,7 +482,7 @@ impl<'a> Step {
|
||||||
column(
|
column(
|
||||||
Language::all()
|
Language::all()
|
||||||
.iter()
|
.iter()
|
||||||
.cloned()
|
.copied()
|
||||||
.map(|language| {
|
.map(|language| {
|
||||||
radio(
|
radio(
|
||||||
language,
|
language,
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ impl Linear {
|
||||||
mut self,
|
mut self,
|
||||||
stops: impl IntoIterator<Item = ColorStop>,
|
stops: impl IntoIterator<Item = ColorStop>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
for stop in stops.into_iter() {
|
for stop in stops {
|
||||||
self = self.add_stop(stop.offset, stop.color)
|
self = self.add_stop(stop.offset, stop.color)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ impl Debug {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn startup_finished(&mut self) {
|
pub fn startup_finished(&mut self) {
|
||||||
self.startup_duration = time::Instant::now() - self.startup_start;
|
self.startup_duration = self.startup_start.elapsed();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update_started(&mut self) {
|
pub fn update_started(&mut self) {
|
||||||
|
|
@ -83,8 +83,7 @@ impl Debug {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update_finished(&mut self) {
|
pub fn update_finished(&mut self) {
|
||||||
self.update_durations
|
self.update_durations.push(self.update_start.elapsed());
|
||||||
.push(time::Instant::now() - self.update_start);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn view_started(&mut self) {
|
pub fn view_started(&mut self) {
|
||||||
|
|
@ -92,8 +91,7 @@ impl Debug {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn view_finished(&mut self) {
|
pub fn view_finished(&mut self) {
|
||||||
self.view_durations
|
self.view_durations.push(self.view_start.elapsed());
|
||||||
.push(time::Instant::now() - self.view_start);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn layout_started(&mut self) {
|
pub fn layout_started(&mut self) {
|
||||||
|
|
@ -101,8 +99,7 @@ impl Debug {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn layout_finished(&mut self) {
|
pub fn layout_finished(&mut self) {
|
||||||
self.layout_durations
|
self.layout_durations.push(self.layout_start.elapsed());
|
||||||
.push(time::Instant::now() - self.layout_start);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn event_processing_started(&mut self) {
|
pub fn event_processing_started(&mut self) {
|
||||||
|
|
@ -110,8 +107,7 @@ impl Debug {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn event_processing_finished(&mut self) {
|
pub fn event_processing_finished(&mut self) {
|
||||||
self.event_durations
|
self.event_durations.push(self.event_start.elapsed());
|
||||||
.push(time::Instant::now() - self.event_start);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn draw_started(&mut self) {
|
pub fn draw_started(&mut self) {
|
||||||
|
|
@ -119,8 +115,7 @@ impl Debug {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn draw_finished(&mut self) {
|
pub fn draw_finished(&mut self) {
|
||||||
self.draw_durations
|
self.draw_durations.push(self.draw_start.elapsed());
|
||||||
.push(time::Instant::now() - self.draw_start);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn render_started(&mut self) {
|
pub fn render_started(&mut self) {
|
||||||
|
|
@ -128,8 +123,7 @@ impl Debug {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn render_finished(&mut self) {
|
pub fn render_finished(&mut self) {
|
||||||
self.render_durations
|
self.render_durations.push(self.render_start.elapsed());
|
||||||
.push(time::Instant::now() - self.render_start);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn log_message<Message: std::fmt::Debug>(&mut self, message: &Message) {
|
pub fn log_message<Message: std::fmt::Debug>(&mut self, message: &Message) {
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ fn convert_path(path: &Path) -> Option<tiny_skia::Path> {
|
||||||
let mut builder = tiny_skia::PathBuilder::new();
|
let mut builder = tiny_skia::PathBuilder::new();
|
||||||
let mut last_point = Default::default();
|
let mut last_point = Default::default();
|
||||||
|
|
||||||
for event in path.raw().iter() {
|
for event in path.raw() {
|
||||||
match event {
|
match event {
|
||||||
lyon_path::Event::Begin { at } => {
|
lyon_path::Event::Begin { at } => {
|
||||||
builder.move_to(at.x, at.y);
|
builder.move_to(at.x, at.y);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue