From 92e78a4bc5b817ca0d5e70442e949c184132a497 Mon Sep 17 00:00:00 2001 From: ira Date: Mon, 26 Sep 2022 21:47:31 +0000 Subject: [PATCH] Fix some grammatical errors in the docs (#6109) Co-authored-by: devil-ira --- crates/bevy_hierarchy/src/events.rs | 15 +++++++-------- crates/bevy_time/src/stopwatch.rs | 8 ++++---- crates/bevy_time/src/timer.rs | 2 +- docs/profiling.md | 2 +- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/crates/bevy_hierarchy/src/events.rs b/crates/bevy_hierarchy/src/events.rs index 5fd3555de9..64f1d2118d 100644 --- a/crates/bevy_hierarchy/src/events.rs +++ b/crates/bevy_hierarchy/src/events.rs @@ -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, diff --git a/crates/bevy_time/src/stopwatch.rs b/crates/bevy_time/src/stopwatch.rs index 46fa0d5eec..299ec1aa93 100644 --- a/crates/bevy_time/src/stopwatch.rs +++ b/crates/bevy_time/src/stopwatch.rs @@ -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() diff --git a/crates/bevy_time/src/timer.rs b/crates/bevy_time/src/timer.rs index d952246ffd..f94fbac76a 100644 --- a/crates/bevy_time/src/timer.rs +++ b/crates/bevy_time/src/timer.rs @@ -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 { diff --git a/docs/profiling.md b/docs/profiling.md index 75d13e1f27..d7fb745f71 100644 --- a/docs/profiling.md +++ b/docs/profiling.md @@ -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.