From 31c055fc8fa4711acd2e94fc8617efea7bbef14d Mon Sep 17 00:00:00 2001 From: kxie Date: Tue, 15 Aug 2023 16:43:59 +0800 Subject: [PATCH] cargo fmt --- core/src/angle.rs | 7 +++++-- examples/loading_spinners/src/circular.rs | 2 +- graphics/src/geometry/path/arc.rs | 2 +- graphics/src/geometry/path/builder.rs | 6 ++++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/core/src/angle.rs b/core/src/angle.rs index 679742c5b0..d05da06e6a 100644 --- a/core/src/angle.rs +++ b/core/src/angle.rs @@ -1,5 +1,8 @@ use crate::{Point, Rectangle, Vector}; -use std::{f32::consts::PI, ops::{SubAssign, AddAssign, Add, Sub, Mul, Div}}; +use std::{ + f32::consts::PI, + ops::{Add, AddAssign, Div, Mul, Sub, SubAssign}, +}; #[derive(Debug, Copy, Clone, PartialEq)] /// Degrees @@ -74,4 +77,4 @@ impl Div for Radians { fn div(self, rhs: f32) -> Self::Output { Radians(self.0 / rhs) } -} \ No newline at end of file +} diff --git a/examples/loading_spinners/src/circular.rs b/examples/loading_spinners/src/circular.rs index 5b08a67cc3..d20d40282c 100644 --- a/examples/loading_spinners/src/circular.rs +++ b/examples/loading_spinners/src/circular.rs @@ -8,10 +8,10 @@ use iced::mouse; use iced::time::Instant; use iced::widget::canvas; use iced::window::{self, RedrawRequest}; +use iced::Radians; use iced::{ Background, Color, Element, Event, Length, Rectangle, Size, Vector, }; -use iced::Radians; use super::easing::{self, Easing}; diff --git a/graphics/src/geometry/path/arc.rs b/graphics/src/geometry/path/arc.rs index f2e5620d2d..2600497f85 100644 --- a/graphics/src/geometry/path/arc.rs +++ b/graphics/src/geometry/path/arc.rs @@ -1,5 +1,5 @@ //! Build and draw curves. -use iced_core::{Point, Vector, Radians}; +use iced_core::{Point, Radians, Vector}; /// A segment of a differentiable curve. #[derive(Debug, Clone, Copy)] diff --git a/graphics/src/geometry/path/builder.rs b/graphics/src/geometry/path/builder.rs index ba4606b874..bad68e61fc 100644 --- a/graphics/src/geometry/path/builder.rs +++ b/graphics/src/geometry/path/builder.rs @@ -1,6 +1,6 @@ use crate::geometry::path::{arc, Arc, Path}; -use iced_core::{Point, Size, Radians}; +use iced_core::{Point, Radians, Size}; use lyon_path::builder::{self, SvgPathBuilder}; use lyon_path::geom; @@ -108,7 +108,9 @@ impl Builder { radii: math::Vector::new(arc.radii.x, arc.radii.y), x_rotation: math::Angle::radians(arc.rotation.0), start_angle: math::Angle::radians(arc.start_angle.0), - sweep_angle: math::Angle::radians((arc.end_angle - arc.start_angle).0), + sweep_angle: math::Angle::radians( + (arc.end_angle - arc.start_angle).0, + ), }; let _ = self.raw.move_to(arc.sample(0.0));