Skip to content

Commit

Permalink
chore: fix some comments
Browse files Browse the repository at this point in the history
Signed-off-by: findmyhappy <[email protected]>
  • Loading branch information
findmyhappy committed Apr 24, 2024
1 parent c8d214d commit a3f2ad5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/query/par_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/light/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ptr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ of type `T`. If you've ever worked with C++, `NonNull<T>` 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

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ui/src/render/ui.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ fn draw(in: VertexOutput) -> vec4<f32> {

// 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.
Expand Down
5 changes: 3 additions & 2 deletions examples/app/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a3f2ad5

Please sign in to comment.