From 5696afcadd5b3b89a532f4205efac30d8a24d558 Mon Sep 17 00:00:00 2001 From: Malte Veerman Date: Wed, 11 Dec 2019 22:13:29 +0100 Subject: Ran cargo_fmt over changed files. --- native/src/widget/icon.rs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'native') diff --git a/native/src/widget/icon.rs b/native/src/widget/icon.rs index 4687d7e6..b3906ccf 100644 --- a/native/src/widget/icon.rs +++ b/native/src/widget/icon.rs @@ -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 for Element<'a, Message, Renderer> -- cgit