Fix some grammatical errors in the docs (#6109)

Co-authored-by: devil-ira <justthecooldude@gmail.com>
This commit is contained in:
ira 2022-09-26 21:47:31 +00:00
parent 39467e30fd
commit 92e78a4bc5
4 changed files with 13 additions and 14 deletions

View file

@ -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,

View file

@ -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
@ -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()
@ -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()

View file

@ -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 {

View file

@ -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.