Skip to content

Commit 7645ce9

Browse files
authored
Add newlines before impl blocks (#19746)
# Objective Fix #19617 # Solution Add newlines before all impl blocks. I suspect that at least some of these will be objectionable! If there's a desired Bevy style for this then I'll update the PR. If not then we can just close it - it's the work of a single find and replace.
1 parent a466084 commit 7645ce9

File tree

59 files changed

+170
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+170
-1
lines changed

benches/benches/bevy_ecs/change_detection.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ impl BenchModify for Table {
4949
black_box(self.0)
5050
}
5151
}
52+
5253
impl BenchModify for Sparse {
5354
fn bench_modify(&mut self) -> f32 {
5455
self.0 += 1f32;

crates/bevy_app/src/propagate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ impl<C: Component + Clone + PartialEq> core::fmt::Debug for PropagateSet<C> {
8888
}
8989

9090
impl<C: Component + Clone + PartialEq> Eq for PropagateSet<C> {}
91+
9192
impl<C: Component + Clone + PartialEq> core::hash::Hash for PropagateSet<C> {
9293
fn hash<H: core::hash::Hasher>(&self, state: &mut H) {
9394
self._p.hash(state);

crates/bevy_asset/src/direct_access_ext.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ pub trait DirectAssetAccessExt {
2020
settings: impl Fn(&mut S) + Send + Sync + 'static,
2121
) -> Handle<A>;
2222
}
23+
2324
impl DirectAssetAccessExt for World {
2425
/// Insert an asset similarly to [`Assets::add`].
2526
///

crates/bevy_asset/src/io/embedded/embedded_watcher.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ pub(crate) struct EmbeddedEventHandler {
5656
dir: Dir,
5757
last_event: Option<AssetSourceEvent>,
5858
}
59+
5960
impl FilesystemEventHandler for EmbeddedEventHandler {
6061
fn begin(&mut self) {
6162
self.last_event = None;

crates/bevy_asset/src/io/embedded/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,19 @@ impl EmbeddedAssetRegistry {
141141
pub trait GetAssetServer {
142142
fn get_asset_server(&self) -> &AssetServer;
143143
}
144+
144145
impl GetAssetServer for App {
145146
fn get_asset_server(&self) -> &AssetServer {
146147
self.world().get_asset_server()
147148
}
148149
}
150+
149151
impl GetAssetServer for World {
150152
fn get_asset_server(&self) -> &AssetServer {
151153
self.resource()
152154
}
153155
}
156+
154157
impl GetAssetServer for AssetServer {
155158
fn get_asset_server(&self) -> &AssetServer {
156159
self

crates/bevy_asset/src/reflect.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ pub struct ReflectHandle {
223223
downcast_handle_untyped: fn(&dyn Any) -> Option<UntypedHandle>,
224224
typed: fn(UntypedHandle) -> Box<dyn Reflect>,
225225
}
226+
226227
impl ReflectHandle {
227228
/// The [`TypeId`] of the asset
228229
pub fn asset_type_id(&self) -> TypeId {

crates/bevy_audio/src/audio_output.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ pub struct PlaybackRemoveMarker;
5757
pub(crate) struct EarPositions<'w, 's> {
5858
pub(crate) query: Query<'w, 's, (Entity, &'static GlobalTransform, &'static SpatialListener)>,
5959
}
60+
6061
impl<'w, 's> EarPositions<'w, 's> {
6162
/// Gets a set of transformed ear positions.
6263
///

crates/bevy_core_pipeline/src/core_3d/camera_3d.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ impl From<TextureUsages> for Camera3dDepthTextureUsage {
8080
Self(value.bits())
8181
}
8282
}
83+
8384
impl From<Camera3dDepthTextureUsage> for TextureUsages {
8485
fn from(value: Camera3dDepthTextureUsage) -> Self {
8586
Self::from_bits_truncate(value.0)

crates/bevy_diagnostic/src/frame_time_diagnostics_plugin.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ pub struct FrameTimeDiagnosticsPlugin {
1717
/// The smoothing factor for the exponential moving average. Usually `2.0 / (history_length + 1.0)`.
1818
pub smoothing_factor: f64,
1919
}
20+
2021
impl Default for FrameTimeDiagnosticsPlugin {
2122
fn default() -> Self {
2223
Self::new(DEFAULT_MAX_HISTORY_LENGTH)
2324
}
2425
}
26+
2527
impl FrameTimeDiagnosticsPlugin {
2628
/// Creates a new `FrameTimeDiagnosticsPlugin` with the specified `max_history_length` and a
2729
/// reasonable `smoothing_factor`.

crates/bevy_ecs/src/archetype.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,7 @@ impl Index<RangeFrom<ArchetypeGeneration>> for Archetypes {
960960
&self.archetypes[index.start.0.index()..]
961961
}
962962
}
963+
963964
impl Index<ArchetypeId> for Archetypes {
964965
type Output = Archetype;
965966

0 commit comments

Comments
 (0)