Skip to content

Commit 3d4e006

Browse files
committed
Move float_ord from bevy_core to bevy_utils (#4189)
# Objective Reduce the catch-all grab-bag of functionality in bevy_core by moving FloatOrd to bevy_utils. A step in addressing #2931 and splitting bevy_core into more specific locations. ## Solution Move FloatOrd into bevy_utils. Fix the compile errors. As a result, bevy_core_pipeline, bevy_pbr, bevy_sprite, bevy_text, and bevy_ui no longer depend on bevy_core (they were only using it for `FloatOrd` previously).
1 parent 8e03634 commit 3d4e006

File tree

17 files changed

+14
-19
lines changed

17 files changed

+14
-19
lines changed

crates/bevy_core/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
#![warn(missing_docs)]
22
//! This crate provides core functionality for Bevy Engine.
33
4-
mod float_ord;
54
mod name;
65
mod task_pool_options;
76
mod time;
87

98
pub use bytemuck::{bytes_of, cast_slice, Pod, Zeroable};
10-
pub use float_ord::*;
119
pub use name::*;
1210
pub use task_pool_options::*;
1311
pub use time::*;

crates/bevy_core_pipeline/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ trace = []
1919
# bevy
2020
bevy_app = { path = "../bevy_app", version = "0.8.0-dev" }
2121
bevy_asset = { path = "../bevy_asset", version = "0.8.0-dev" }
22-
bevy_core = { path = "../bevy_core", version = "0.8.0-dev" }
2322
bevy_ecs = { path = "../bevy_ecs", version = "0.8.0-dev" }
2423
bevy_render = { path = "../bevy_render", version = "0.8.0-dev" }
2524
bevy_utils = { path = "../bevy_utils", version = "0.8.0-dev" }

crates/bevy_core_pipeline/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ pub use main_pass_driver::*;
2020
use std::ops::Range;
2121

2222
use bevy_app::{App, Plugin};
23-
use bevy_core::FloatOrd;
2423
use bevy_ecs::prelude::*;
2524
use bevy_render::{
2625
camera::{ActiveCamera, Camera2d, Camera3d, ExtractedCamera, RenderTarget},
@@ -36,6 +35,7 @@ use bevy_render::{
3635
view::{ExtractedView, Msaa, ViewDepthTexture},
3736
RenderApp, RenderStage, RenderWorld,
3837
};
38+
use bevy_utils::FloatOrd;
3939

4040
/// When used as a resource, sets the color that is used to clear the screen between frames.
4141
///

crates/bevy_pbr/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ webgl = []
1515
# bevy
1616
bevy_app = { path = "../bevy_app", version = "0.8.0-dev" }
1717
bevy_asset = { path = "../bevy_asset", version = "0.8.0-dev" }
18-
bevy_core = { path = "../bevy_core", version = "0.8.0-dev" }
1918
bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.8.0-dev" }
2019
bevy_ecs = { path = "../bevy_ecs", version = "0.8.0-dev" }
2120
bevy_math = { path = "../bevy_math", version = "0.8.0-dev" }

crates/bevy_pbr/src/render/light.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use crate::{
44
PointLight, PointLightShadowMap, SetMeshBindGroup, VisiblePointLights, SHADOW_SHADER_HANDLE,
55
};
66
use bevy_asset::Handle;
7-
use bevy_core::FloatOrd;
87
use bevy_core_pipeline::Transparent3d;
98
use bevy_ecs::{
109
prelude::*,
@@ -30,6 +29,7 @@ use bevy_render::{
3029
},
3130
};
3231
use bevy_transform::components::GlobalTransform;
32+
use bevy_utils::FloatOrd;
3333
use bevy_utils::{
3434
tracing::{error, warn},
3535
HashMap,

crates/bevy_sprite/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ keywords = ["bevy"]
1212
# bevy
1313
bevy_app = { path = "../bevy_app", version = "0.8.0-dev" }
1414
bevy_asset = { path = "../bevy_asset", version = "0.8.0-dev" }
15-
bevy_core = { path = "../bevy_core", version = "0.8.0-dev" }
1615
bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.8.0-dev" }
1716
bevy_ecs = { path = "../bevy_ecs", version = "0.8.0-dev" }
1817
bevy_log = { path = "../bevy_log", version = "0.8.0-dev" }

crates/bevy_sprite/src/mesh2d/material.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use bevy_app::{App, Plugin};
22
use bevy_asset::{AddAsset, Asset, AssetServer, Handle};
3-
use bevy_core::FloatOrd;
43
use bevy_core_pipeline::Transparent2d;
54
use bevy_ecs::{
65
entity::Entity,
@@ -29,6 +28,7 @@ use bevy_render::{
2928
RenderApp, RenderStage,
3029
};
3130
use bevy_transform::components::{GlobalTransform, Transform};
31+
use bevy_utils::FloatOrd;
3232
use std::hash::Hash;
3333
use std::marker::PhantomData;
3434

crates/bevy_sprite/src/render/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use crate::{
55
Rect, Sprite, SPRITE_SHADER_HANDLE,
66
};
77
use bevy_asset::{AssetEvent, Assets, Handle, HandleId};
8-
use bevy_core::FloatOrd;
98
use bevy_core_pipeline::Transparent2d;
109
use bevy_ecs::{
1110
prelude::*,
@@ -27,6 +26,7 @@ use bevy_render::{
2726
RenderWorld,
2827
};
2928
use bevy_transform::components::GlobalTransform;
29+
use bevy_utils::FloatOrd;
3030
use bevy_utils::HashMap;
3131
use bytemuck::{Pod, Zeroable};
3232
use copyless::VecHelper;

crates/bevy_text/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ subpixel_glyph_atlas = []
1515
# bevy
1616
bevy_app = { path = "../bevy_app", version = "0.8.0-dev" }
1717
bevy_asset = { path = "../bevy_asset", version = "0.8.0-dev" }
18-
bevy_core = { path = "../bevy_core", version = "0.8.0-dev" }
1918
bevy_ecs = { path = "../bevy_ecs", version = "0.8.0-dev" }
2019
bevy_math = { path = "../bevy_math", version = "0.8.0-dev" }
2120
bevy_reflect = { path = "../bevy_reflect", version = "0.8.0-dev", features = ["bevy"] }

crates/bevy_text/src/font_atlas_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use crate::{error::TextError, Font, FontAtlas};
22
use ab_glyph::{GlyphId, OutlinedGlyph, Point};
33
use bevy_asset::{Assets, Handle};
4-
use bevy_core::FloatOrd;
54
use bevy_math::Vec2;
65
use bevy_reflect::TypeUuid;
76
use bevy_render::texture::Image;
87
use bevy_sprite::TextureAtlas;
8+
use bevy_utils::FloatOrd;
99
use bevy_utils::HashMap;
1010

1111
type FontSizeKey = FloatOrd;

0 commit comments

Comments
 (0)