Skip to content

Commit

Permalink
Remove Bytes, FromBytes, Labels, EntityLabels. Document rest of bevy_…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
james7132 committed Jan 2, 2022
1 parent 363bdf7 commit dc8fefe
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 484 deletions.
103 changes: 0 additions & 103 deletions crates/bevy_core/src/bytes.rs

This file was deleted.

7 changes: 3 additions & 4 deletions crates/bevy_core/src/float_ord.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::bytes_of;
use std::{
cmp::Ordering,
hash::{Hash, Hasher},
Expand Down Expand Up @@ -42,12 +41,12 @@ impl Hash for FloatOrd {
fn hash<H: Hasher>(&self, state: &mut H) {
if self.0.is_nan() {
// Ensure all NaN representations hash to the same value
state.write(bytes_of(&f32::NAN))
state.write(bytemuck::bytes_of(&f32::NAN))
} else if self.0 == 0.0 {
// Ensure both zeroes hash to the same value
state.write(bytes_of(&0.0f32))
state.write(bytemuck::bytes_of(&0.0f32))
} else {
state.write(bytes_of(&self.0));
state.write(bytemuck::bytes_of(&self.0));
}
}
}
Expand Down
256 changes: 0 additions & 256 deletions crates/bevy_core/src/label.rs

This file was deleted.

Loading

0 comments on commit dc8fefe

Please sign in to comment.