Skip to content

Commit a1530b0

Browse files
committed
doc cleanup
1 parent 1f1d205 commit a1530b0

File tree

7 files changed

+21
-16
lines changed

7 files changed

+21
-16
lines changed

crates/bevy_ecs/src/entity/entity_set.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub trait ContainsEntity {
5858
/// To obtain hash values forming the same total order as [`Entity`], any [`Hasher`] used must be
5959
/// deterministic and concerning [`Entity`], collisionless.
6060
/// Standard library hash collections handle collisions with an [`Eq`] fallback, but do not account for
61-
/// determinism when [`BuildHasher`] is unspecified,.
61+
/// determinism when [`BuildHasher`] is unspecified.
6262
///
6363
/// [`Hash`]: core::hash::Hash
6464
/// [`Hasher`]: core::hash::Hasher
@@ -149,12 +149,12 @@ unsafe impl<T: EntityEquivalent> EntityEquivalent for Arc<T> {}
149149
/// As a consequence, [`into_iter()`] on `EntitySet` will always produce another `EntitySet`.
150150
///
151151
/// Implementing this trait allows for unique query iteration over a list of entities.
152-
/// See [`iter_many_unique`] and [`iter_many_unique_mut`]
152+
/// See [`iter_many_unique`] and [`iter_many_unique_mut`].
153153
///
154154
/// Note that there is no guarantee of the [`IntoIterator`] impl being deterministic,
155155
/// it might return different iterators when called multiple times.
156156
/// Neither is there a guarantee that the comparison trait impls of `EntitySet` match that
157-
/// of the respective [`EntitySetIterator`] (or of a [`Vec`] collected from its elements)
157+
/// of the respective [`EntitySetIterator`] (or of a [`Vec`] collected from its elements).
158158
///
159159
/// [`Self::IntoIter`]: IntoIterator::IntoIter
160160
/// [`into_iter()`]: IntoIterator::into_iter

crates/bevy_ecs/src/entity/hash_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl<V> EntityHashMap<V> {
3636
///
3737
/// Equivalent to [`HashMap::with_capacity_and_hasher(n, EntityHash)`].
3838
///
39-
/// [`HashMap:with_capacity_and_hasher(n, EntityHash)`]: HashMap::with_capacity_and_hasher
39+
/// [`HashMap::with_capacity_and_hasher(n, EntityHash)`]: HashMap::with_capacity_and_hasher
4040
#[inline]
4141
pub fn with_capacity(n: usize) -> Self {
4242
Self(HashMap::with_capacity_and_hasher(n, EntityHash))

crates/bevy_ecs/src/entity/index_map.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ use core::{
1818
#[cfg(feature = "bevy_reflect")]
1919
use bevy_reflect::Reflect;
2020
pub use indexmap::map::Entry;
21-
use indexmap::map::{self, IndexMap, IntoValues, ValuesMut};
21+
use indexmap::{
22+
self,
23+
map::{self, IntoValues, ValuesMut},
24+
IndexMap,
25+
};
2226

2327
use super::{Entity, EntityEquivalent, EntityHash, EntitySetIterator};
2428

@@ -35,7 +39,7 @@ impl<V> EntityIndexMap<V> {
3539
///
3640
/// Equivalent to [`IndexMap::with_hasher(EntityHash)`].
3741
///
38-
/// [`IndexMap::with_hasher(EntityHash)`]: IndexMap::with_hasher
42+
/// [`IndexMap::with_hasher(EntityHash)`]: indexmap::IndexMap::with_hasher
3943
#[inline]
4044
pub const fn new() -> Self {
4145
Self(IndexMap::with_hasher(EntityHash))
@@ -45,7 +49,7 @@ impl<V> EntityIndexMap<V> {
4549
///
4650
/// Equivalent to [`IndexMap::with_capacity_and_hasher(n, EntityHash)`].
4751
///
48-
/// [`IndexMap:with_capacity_and_hasher(n, EntityHash)`]: IndexMap::with_capacity_and_hasher
52+
/// [`IndexMap::with_capacity_and_hasher(n, EntityHash)`]: indexmap::IndexMap::with_capacity_and_hasher
4953
#[inline]
5054
pub fn with_capacity(n: usize) -> Self {
5155
Self(IndexMap::with_capacity_and_hasher(n, EntityHash))
@@ -1224,15 +1228,15 @@ impl<'a, V> Drain<'a, V> {
12241228
Drain::<'_, _, S>(drain, PhantomData)
12251229
}
12261230

1227-
/// Returns the inner [`Drain`](map::Drain).
1231+
/// Returns the inner [`Drain`](indexmap::map::Drain).
12281232
#[inline]
12291233
pub fn into_inner(self) -> map::Drain<'a, Entity, V> {
12301234
self.0
12311235
}
12321236

12331237
/// Returns a slice of the remaining entries in the iterator.
12341238
///
1235-
/// Equivalent to [`map::Drain::as_slice`].
1239+
/// Equivalent to [`map::Drain::as_slice`](`indexmap::map::Drain::as_slice`).
12361240
#[inline]
12371241
pub fn as_slice(&self) -> &Slice<V> {
12381242
// SAFETY: The source IndexMap uses EntityHash.

crates/bevy_ecs/src/entity/index_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use core::{
1616
ptr,
1717
};
1818

19-
use indexmap::set::{self, IndexSet};
19+
use indexmap::{self, set, IndexSet};
2020

2121
use super::{Entity, EntityHash, EntitySetIterator};
2222

crates/bevy_ecs/src/entity/unique_slice.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,8 @@ impl<T: EntityEquivalent> UniqueEntityEquivalentSlice<T> {
369369
}
370370
}
371371

372-
///
372+
/// Returns an iterator over `chunk_size` elements of the slice at a time, starting at the
373+
/// beginning of the slice.
373374
///
374375
/// Equivalent to [`[T]::chunks_exact`].
375376
///

crates/bevy_ecs/src/entity/unique_vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl<T: EntityEquivalent> UniqueEntityEquivalentVec<T> {
9191
Self(vec)
9292
}
9393

94-
/// Constructs a `UniqueEntityEquivalentVec` from a [`&Vec<T>`] unsafely.
94+
/// Constructs a `UniqueEntityEquivalentVec` from a [`&Vec<T>`](Vec) unsafely.
9595
///
9696
/// # Safety
9797
///
@@ -102,7 +102,7 @@ impl<T: EntityEquivalent> UniqueEntityEquivalentVec<T> {
102102
unsafe { &*ptr::from_ref(vec).cast() }
103103
}
104104

105-
/// Constructs a `UniqueEntityEquivalentVec` from a [`&mut Vec<T>`] unsafely.
105+
/// Constructs a `UniqueEntityEquivalentVec` from a [`&mut Vec<T>`](Vec) unsafely.
106106
///
107107
/// # Safety
108108
///

crates/bevy_ecs/src/system/query.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> {
939939
///
940940
/// fn into_iter(self) -> Self::IntoIter {
941941
/// // SAFETY: `Friends` ensures that it unique_list contains only unique entities.
942-
/// unsafe { UniqueEntityIter::from_iterator_unchecked(self.unique_list.iter()) }
942+
/// unsafe { UniqueEntityIter::from_iter_unchecked(self.unique_list.iter()) }
943943
/// }
944944
/// }
945945
///
@@ -994,7 +994,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> {
994994
///
995995
/// fn into_iter(self) -> Self::IntoIter {
996996
/// // SAFETY: `Friends` ensures that it unique_list contains only unique entities.
997-
/// unsafe { UniqueEntityIter::from_iterator_unchecked(self.unique_list.iter()) }
997+
/// unsafe { UniqueEntityIter::from_iter_unchecked(self.unique_list.iter()) }
998998
/// }
999999
/// }
10001000
///
@@ -1050,7 +1050,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> {
10501050
///
10511051
/// fn into_iter(self) -> Self::IntoIter {
10521052
/// // SAFETY: `Friends` ensures that it unique_list contains only unique entities.
1053-
/// unsafe { UniqueEntityIter::from_iterator_unchecked(self.unique_list.iter()) }
1053+
/// unsafe { UniqueEntityIter::from_iter_unchecked(self.unique_list.iter()) }
10541054
/// }
10551055
/// }
10561056
///

0 commit comments

Comments
 (0)