Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ua-kxie committed Aug 15, 2023
1 parent c7becd3 commit 31c055f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
7 changes: 5 additions & 2 deletions core/src/angle.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -74,4 +77,4 @@ impl Div<f32> for Radians {
fn div(self, rhs: f32) -> Self::Output {
Radians(self.0 / rhs)
}
}
}
2 changes: 1 addition & 1 deletion examples/loading_spinners/src/circular.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
2 changes: 1 addition & 1 deletion graphics/src/geometry/path/arc.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
6 changes: 4 additions & 2 deletions graphics/src/geometry/path/builder.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 31c055f

Please sign in to comment.