Skip to content

Commit 9711258

Browse files
committed
Apply suggestions
1 parent 20fef0c commit 9711258

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

crates/bevy_ecs/src/bundle.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,13 @@ use bevy_utils::TypeIdMap;
8181
use core::{any::TypeId, ptr::NonNull};
8282
use variadics_please::all_tuples;
8383

84+
/// A collection of components, whose identity may or may not be fixed at compile time.
85+
///
8486
/// The `Bundle` trait enables insertion of [`Component`]s to an entity.
8587
/// For the removal of [`Component`]s from an entity see the [`StaticBundle`]`trait`.
8688
///
8789
/// Implementers of the `Bundle` trait are called 'bundles'.
8890
///
89-
/// Each bundle represents a possibly dynamic set of [`Component`] types.
9091
/// Currently, bundles can only contain one of each [`Component`], and will
9192
/// panic once initialized if this is not met.
9293
///
@@ -214,10 +215,10 @@ pub unsafe trait Bundle: DynamicBundle + Send + Sync + 'static {
214215
);
215216
}
216217

217-
/// Each bundle represents a static and fixed set of [`Component`] types.
218+
/// A static and fixed set of [`Component`] types.
218219
/// See the [`Bundle`] trait for a possibly dynamic set of [`Component`] types.
219220
///
220-
/// Implementers of the `Bundle` trait are called 'static bundles'.
221+
/// Implementers of the [`StaticBundle`] trait are called 'static bundles'.
221222
///
222223
/// ## Removal
223224
///
@@ -233,7 +234,8 @@ pub unsafe trait Bundle: DynamicBundle + Send + Sync + 'static {
233234
/// Manual implementations of this trait are unsupported.
234235
/// That is, there is no safe way to implement this trait, and you must not do so.
235236
/// If you want a type to implement [`StaticBundle`], you must use [`derive@Bundle`](derive@Bundle).
236-
// Some safety points:
237+
//
238+
// (bevy internal doc) Some safety points:
237239
// - [`StaticBundle::component_ids`] and [`StaticBundle::get_component_ids`] must match the behavior of [`Bundle::component_ids`]
238240
#[diagnostic::on_unimplemented(
239241
message = "`{Self}` is not a `StaticBundle`",

release-content/migration-guides/static-bundle-split.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: StaticBundle split off from Bundle
2+
title: \`StaticBundle` has been split off from `Bundle`
33
pull_requests: [19491]
44
---
55

0 commit comments

Comments
 (0)