Skip to content

Commit dc8fefe

Browse files
committed
Remove Bytes, FromBytes, Labels, EntityLabels. Document rest of bevy_core and enable warning on missing docs. (#3521)
This PR is part of the issue #3492. # Objective - Clean up dead code in `bevy_core`. - Add and update the `bevy_core` documentation to achieve a 100% documentation coverage. - Add the #![warn(missing_docs)] lint to keep the documentation coverage for the future. # Solution - Remove unused `Bytes`, `FromBytes`, `Labels`, and `EntityLabels` types and associated systems. - Made several types private that really only have use as internal types, mostly pertaining to fixed timestep execution. - Add and update the bevy_core documentation. - Add the #![warn(missing_docs)] lint. # Open Questions Should more of the internal states of `FixedTimestep` be public? Seems mostly to be an implementation detail unless someone really needs that fixed timestep state.
1 parent 363bdf7 commit dc8fefe

File tree

12 files changed

+80
-484
lines changed

12 files changed

+80
-484
lines changed

crates/bevy_core/src/bytes.rs

-103
This file was deleted.

crates/bevy_core/src/float_ord.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use crate::bytes_of;
21
use std::{
32
cmp::Ordering,
43
hash::{Hash, Hasher},
@@ -42,12 +41,12 @@ impl Hash for FloatOrd {
4241
fn hash<H: Hasher>(&self, state: &mut H) {
4342
if self.0.is_nan() {
4443
// Ensure all NaN representations hash to the same value
45-
state.write(bytes_of(&f32::NAN))
44+
state.write(bytemuck::bytes_of(&f32::NAN))
4645
} else if self.0 == 0.0 {
4746
// Ensure both zeroes hash to the same value
48-
state.write(bytes_of(&0.0f32))
47+
state.write(bytemuck::bytes_of(&0.0f32))
4948
} else {
50-
state.write(bytes_of(&self.0));
49+
state.write(bytemuck::bytes_of(&self.0));
5150
}
5251
}
5352
}

crates/bevy_core/src/label.rs

-256
This file was deleted.

0 commit comments

Comments
 (0)