Skip to content

Commit

Permalink
Fix some grammatical errors in the docs (bevyengine#6109)
Browse files Browse the repository at this point in the history
Co-authored-by: devil-ira <justthecooldude@gmail.com>
  • Loading branch information
2 people authored and james7132 committed Oct 28, 2022
1 parent 48a4dbb commit 957c741
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
15 changes: 7 additions & 8 deletions crates/bevy_hierarchy/src/events.rs
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
use bevy_ecs::prelude::Entity;

/// A [`Event`] that is fired whenever there is a change in the world's
/// hierarchy.
/// An [`Event`] that is fired whenever there is a change in the world's hierarchy.
///
/// [`Event`]: bevy_ecs::event::Event
#[derive(Debug, Clone)]
pub enum HierarchyEvent {
/// Fired whenever an [`Entity`] is added as a child to a new parent.
/// Fired whenever an [`Entity`] is added as a child to a parent.
ChildAdded {
/// The child that added
/// The child that was added
child: Entity,
/// The parent the child was added to
parent: Entity,
},
/// Fired whenever an child [`Entity`] is removed from is parent.
/// Fired whenever a child [`Entity`] is removed from its parent.
ChildRemoved {
/// The child that removed
/// The child that was removed
child: Entity,
/// The parent the child was removed from
parent: Entity,
},
/// Fired whenever an child [`Entity`] is moved to a new parent.
/// Fired whenever a child [`Entity`] is moved to a new parent.
ChildMoved {
/// The child that moved
/// The child that was moved
child: Entity,
/// The parent the child was removed from
previous_parent: Entity,
Expand Down
8 changes: 4 additions & 4 deletions crates/bevy_time/src/stopwatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ impl Stopwatch {
///
/// # See Also
///
/// [`elapsed_secs`](Stopwatch::elapsed_secs) - if a `f32` value is desirable instead.
/// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if a `f64` is desirable instead.
/// [`elapsed_secs`](Stopwatch::elapsed_secs) - if an `f32` value is desirable instead.
/// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if an `f64` is desirable instead.
#[inline]
pub fn elapsed(&self) -> Duration {
self.elapsed
Expand All @@ -80,7 +80,7 @@ impl Stopwatch {
/// # See Also
///
/// [`elapsed`](Stopwatch::elapsed) - if a `Duration` is desirable instead.
/// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if a `f64` is desirable instead.
/// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if an `f64` is desirable instead.
#[inline]
pub fn elapsed_secs(&self) -> f32 {
self.elapsed().as_secs_f32()
Expand All @@ -92,7 +92,7 @@ impl Stopwatch {
/// # See Also
///
/// [`elapsed`](Stopwatch::elapsed) - if a `Duration` is desirable instead.
/// [`elapsed_secs`](Stopwatch::elapsed_secs) - if a `f32` is desirable instead.
/// [`elapsed_secs`](Stopwatch::elapsed_secs) - if an `f32` is desirable instead.
#[inline]
pub fn elapsed_secs_f64(&self) -> f64 {
self.elapsed().as_secs_f64()
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_time/src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl Timer {
self.stopwatch.elapsed()
}

/// Returns the time elapsed on the timer as a `f32`.
/// Returns the time elapsed on the timer as an `f32`.
/// See also [`Timer::elapsed`](Timer::elapsed).
#[inline]
pub fn elapsed_secs(&self) -> f32 {
Expand Down
2 changes: 1 addition & 1 deletion docs/profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Runtime Flame Graph: `tracing` spans

Bevy has built-in [tracing](https://github.com/tokio-rs/tracing) spans to make it cheap and easy to profile Bevy ECS systems, render logic, engine iternals, and user app code. Enable the `trace` cargo feature to enable Bevy's built-in spans.
Bevy has built-in [tracing](https://github.com/tokio-rs/tracing) spans to make it cheap and easy to profile Bevy ECS systems, render logic, engine internals, and user app code. Enable the `trace` cargo feature to enable Bevy's built-in spans.

If you also want to include `wgpu` tracing spans when profiling, they are emitted at the `tracing` `info` level so you will need to make sure they are not filtered out by the `LogSettings` resource's `filter` member which defaults to `wgpu=error`. You can do this by setting the `RUST_LOG=info` environment variable when running your application.

Expand Down

0 comments on commit 957c741

Please sign in to comment.