Skip to content

Commit 688f22b

Browse files
committed
Update format style
1 parent 63aa580 commit 688f22b

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

rustfmt.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
format_code_in_doc_comments = true
2+
group_imports = "StdExternalCrate"
23
imports_granularity = "Crate"
34
newline_style = "Unix"
45
reorder_impl_items = true

src/entity.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//! Custom Bevy [`Bundle`] for shapes.
22
3-
use crate::{render::SHAPE_PIPELINE_HANDLE, utils::TessellationMode};
43
use bevy::{
54
asset::Handle,
65
ecs::bundle::Bundle,
@@ -18,6 +17,8 @@ use bevy::{
1817
};
1918
use lyon_tessellation::{path::Path, FillOptions};
2019

20+
use crate::{render::SHAPE_PIPELINE_HANDLE, utils::TessellationMode};
21+
2122
/// A Bevy [`Bundle`] to represent a shape.
2223
#[allow(missing_docs)]
2324
#[derive(Bundle)]

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ pub mod utils;
3838
/// Import this module as `use bevy_prototype_lyon::prelude::*` to get
3939
/// convenient imports.
4040
pub mod prelude {
41+
pub use lyon_tessellation::{
42+
FillOptions, FillRule, LineCap, LineJoin, Orientation, StrokeOptions,
43+
};
44+
4145
pub use crate::{
4246
entity::ShapeMaterial,
4347
geometry::{Geometry, GeometryBuilder},
@@ -46,7 +50,4 @@ pub mod prelude {
4650
shapes,
4751
utils::TessellationMode,
4852
};
49-
pub use lyon_tessellation::{
50-
FillOptions, FillRule, LineCap, LineJoin, Orientation, StrokeOptions,
51-
};
5253
}

src/path.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//! Interface to build custom paths.
22
3-
use crate::utils::Convert;
43
use bevy::math::Vec2;
54
use lyon_tessellation::{
65
geom::Angle,
76
path::{builder::WithSvg, path::Builder, EndpointId, Path},
87
};
98

9+
use crate::utils::Convert;
10+
1011
/// A SVG-like path builder.
1112
pub struct PathBuilder(WithSvg<Builder>);
1213

src/plugin.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
//! that creates a mesh for each entity that has been spawned as a
1212
//! `ShapeBundle`.
1313
14-
use crate::{entity::ShapeMaterial, utils::TessellationMode};
1514
use bevy::{
1615
app::{AppBuilder, Plugin},
1716
asset::{Assets, Handle},
@@ -32,6 +31,8 @@ use lyon_tessellation::{
3231
StrokeTessellator, StrokeVertex, StrokeVertexConstructor,
3332
};
3433

34+
use crate::{entity::ShapeMaterial, utils::TessellationMode};
35+
3536
/// Stages for this plugin.
3637
pub mod stage {
3738
/// The stage where the [`ShapeBundle`](crate::entity::ShapeBundle) gets

src/shapes.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//! [`Geometry`](crate::geometry::Geometry) trait. You can also implement
55
//! the trait for your own shapes.
66
7-
use crate::{geometry::Geometry, utils::Convert};
87
use bevy::math::Vec2;
98
use lyon_tessellation::{
109
math::{point, Angle, Point, Rect, Size, Vector},
@@ -17,6 +16,8 @@ use lyon_tessellation::{
1716
};
1817
use svgtypes::{Path, PathSegment};
1918

19+
use crate::{geometry::Geometry, utils::Convert};
20+
2021
/// Defines where the origin, or pivot of the `Rectangle` should be positioned.
2122
#[allow(missing_docs)]
2223
#[derive(Debug, Clone, Copy, PartialEq)]

0 commit comments

Comments
 (0)