Ran cargo_fmt over changed files.
This commit is contained in:
parent
a88aae5e04
commit
5696afcadd
6 changed files with 53 additions and 55 deletions
|
|
@ -1,8 +1,12 @@
|
|||
//! Display an icon.
|
||||
use crate::{layout, Element, Hasher, Layout, Length, Point, Rectangle, Widget};
|
||||
use crate::{
|
||||
layout, Element, Hasher, Layout, Length, Point, Rectangle, Widget,
|
||||
};
|
||||
|
||||
use std::hash::Hash;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::{
|
||||
hash::Hash,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
/// A simple icon_loader widget.
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
@ -63,10 +67,7 @@ where
|
|||
) -> Renderer::Output {
|
||||
let bounds = layout.bounds();
|
||||
|
||||
renderer.draw(
|
||||
bounds,
|
||||
self.path.as_path(),
|
||||
)
|
||||
renderer.draw(bounds, self.path.as_path())
|
||||
}
|
||||
|
||||
fn hash_layout(&self, state: &mut Hasher) {
|
||||
|
|
@ -86,11 +87,7 @@ pub trait Renderer: crate::Renderer {
|
|||
/// Draws an [`Icon`].
|
||||
///
|
||||
/// [`Icon`]: struct.Icon.html
|
||||
fn draw(
|
||||
&mut self,
|
||||
bounds: Rectangle,
|
||||
path: &Path,
|
||||
) -> Self::Output;
|
||||
fn draw(&mut self, bounds: Rectangle, path: &Path) -> Self::Output;
|
||||
}
|
||||
|
||||
impl<'a, Message, Renderer> From<Icon> for Element<'a, Message, Renderer>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue