Skip to content

Commit

Permalink
Remove link to swap from docs, cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Aceeri committed Dec 20, 2023
1 parent 329a2fc commit 36ee2d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_gizmos/src/gizmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub(crate) struct Swap;
/// They are drawn in immediate mode, which means they will be rendered only for
/// the frames, or ticks when in [`FixedMain`](bevy_app::FixedMain), in which
/// they are spawned.
///
///
/// A system in [`Main`](bevy_app::Main) will be cleared each rendering
/// frame, while a system in [`FixedMain`](bevy_app::FixedMain) will be
/// cleared each time the [`RunFixedMainLoop`](bevy_app::RunFixedMainLoop)
Expand Down
6 changes: 3 additions & 3 deletions crates/bevy_gizmos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,15 @@ struct LineGizmoHandles {
strip: Option<Handle<LineGizmo>>,
}

/// Stash the default gizmos context in the [`Swap`] gizmo storage.
/// Stash the default gizmos context into the gizmo storage swap buffer.
pub fn stash_default_gizmos(world: &mut World) {
world.resource_scope(|world: &mut World, mut swap: Mut<GizmoStorage<Swap>>| {
let mut default = world.resource_mut::<GizmoStorage<()>>();
default.swap(&mut *swap);
});
}

/// Pop the default gizmos context out of the [`Swap`] gizmo storage.
/// Pop the default gizmos context out of the gizmo storage swap buffer.
///
/// This must be called before [`UpdateGizmoMeshes`] in the [`Last`] schedule.
pub fn pop_default_gizmos(world: &mut World) {
Expand Down Expand Up @@ -345,7 +345,7 @@ pub fn propagate_gizmos<Clear>(
pub struct UpdateGizmoMeshes;

/// Prepare gizmos for rendering.
///
///
/// This also clears the default `GizmoStorage`.
fn update_gizmo_meshes(
mut line_gizmos: ResMut<Assets<LineGizmo>>,
Expand Down

0 comments on commit 36ee2d3

Please sign in to comment.