From 36a3e53e10fb10c0d7ff0e224cb3643177abe934 Mon Sep 17 00:00:00 2001 From: findmyhappy <167661649+findmyhappy@users.noreply.github.com> Date: Fri, 26 Apr 2024 03:09:16 +0800 Subject: [PATCH] chore: fix some comments (#13083) # Objective remove repetitive words Signed-off-by: findmyhappy --- crates/bevy_ecs/src/query/par_iter.rs | 2 +- crates/bevy_pbr/src/light/mod.rs | 2 +- crates/bevy_ptr/README.md | 2 +- crates/bevy_ui/src/render/ui.wgsl | 2 +- examples/app/logs.rs | 5 +++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crates/bevy_ecs/src/query/par_iter.rs b/crates/bevy_ecs/src/query/par_iter.rs index 00e474e81b2ac..f433c31014a5b 100644 --- a/crates/bevy_ecs/src/query/par_iter.rs +++ b/crates/bevy_ecs/src/query/par_iter.rs @@ -41,7 +41,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryParIter<'w, 's, D, F> { /// Runs `func` on each query result in parallel on a value returned by `init`. /// /// `init` may be called multiple times per thread, and the values returned may be discarded between tasks on any given thread. - /// Callers should avoid using this function as if it were a a parallel version + /// Callers should avoid using this function as if it were a parallel version /// of [`Iterator::fold`]. /// /// # Example diff --git a/crates/bevy_pbr/src/light/mod.rs b/crates/bevy_pbr/src/light/mod.rs index 2b77c5579109c..f4a3258c9f935 100644 --- a/crates/bevy_pbr/src/light/mod.rs +++ b/crates/bevy_pbr/src/light/mod.rs @@ -1320,7 +1320,7 @@ pub(crate) fn assign_lights_to_clusters( // scale x and y cluster count to be able to fit all our indices // we take the ratio of the actual indices over the index estimate. - // this not not guaranteed to be small enough due to overlapped tiles, but + // this is not guaranteed to be small enough due to overlapped tiles, but // the conservative estimate is more than sufficient to cover the // difference let index_ratio = ViewClusterBindings::MAX_INDICES as f32 / cluster_index_estimate; diff --git a/crates/bevy_ptr/README.md b/crates/bevy_ptr/README.md index 2d39eb1f1ccf7..b422f0be9d828 100644 --- a/crates/bevy_ptr/README.md +++ b/crates/bevy_ptr/README.md @@ -68,7 +68,7 @@ of type `T`. If you've ever worked with C++, `NonNull` is very close to a C++ untyped memory address. Pointing at the unit type (or some other zero-sized type) just happens to be the convention. The only way to reasonably use them is to cast back to a typed pointer. They show up occasionally when dealing with FFI and the rare occasion where dynamic dispatch is required, but a trait is too constraining of an interface to work with. A great example of this are the [RawWaker] APIs, where a singular trait (or set of traits) may be insufficient to capture -all usage patterns. `*mut ()` should only be used to carry the mutability of the target, and as there is no way to to mutate an unknown type. +all usage patterns. `*mut ()` should only be used to carry the mutability of the target, and as there is no way to mutate an unknown type. [RawWaker]: https://doc.rust-lang.org/std/task/struct.RawWaker.html diff --git a/crates/bevy_ui/src/render/ui.wgsl b/crates/bevy_ui/src/render/ui.wgsl index f5737f35ba514..02c81642c7c56 100644 --- a/crates/bevy_ui/src/render/ui.wgsl +++ b/crates/bevy_ui/src/render/ui.wgsl @@ -129,7 +129,7 @@ fn draw(in: VertexOutput) -> vec4 { // Signed distances. The magnitude is the distance of the point from the edge of the shape. // * Negative values indicate that the point is inside the shape. - // * Zero values indicate the point is on on the edge of the shape. + // * Zero values indicate the point is on the edge of the shape. // * Positive values indicate the point is outside the shape. // Signed distance from the exterior boundary. diff --git a/examples/app/logs.rs b/examples/app/logs.rs index a2f46bbf79f2c..8aae4b2c245c9 100644 --- a/examples/app/logs.rs +++ b/examples/app/logs.rs @@ -69,8 +69,9 @@ fn log_once_system() { info_once!("logs once per call site, so this works just fine: {}", i); } - // you can also use the 'once!' macro directly, in situations you want do do - // something expensive only once within the context of a continuous system. + // you can also use the `once!` macro directly, + // in situations where you want to do something expensive only once + // within the context of a continuous system. once!({ info!("doing expensive things"); let mut a: u64 = 0;