mirror of
https://github.com/italicsjenga/valence.git
synced 2025-01-10 06:41:30 +11:00
Fix error in docs
This commit is contained in:
parent
70ef63aae3
commit
2f2bc91535
|
@ -114,7 +114,7 @@ impl<C: Config> Chunks<C> {
|
||||||
self.chunks.get_mut(&pos.into())
|
self.chunks.get_mut(&pos.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Removes all chunks for which `f` returns `true`.
|
/// Removes all chunks for which `f` returns `false`.
|
||||||
///
|
///
|
||||||
/// All chunks are visited in an unspecified order.
|
/// All chunks are visited in an unspecified order.
|
||||||
pub fn retain(&mut self, mut f: impl FnMut(ChunkPos, &mut LoadedChunk<C>) -> bool) {
|
pub fn retain(&mut self, mut f: impl FnMut(ChunkPos, &mut LoadedChunk<C>) -> bool) {
|
||||||
|
|
|
@ -78,7 +78,7 @@ impl<C: Config> Clients<C> {
|
||||||
self.slab.remove(client.0).map(|c| c.state)
|
self.slab.remove(client.0).map(|c| c.state)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Deletes all clients from the server for which `f` returns `true`.
|
/// Deletes all clients from the server for which `f` returns `false`.
|
||||||
///
|
///
|
||||||
/// All clients are visited in an unspecified order.
|
/// All clients are visited in an unspecified order.
|
||||||
pub fn retain(&mut self, mut f: impl FnMut(ClientId, &mut Client<C>) -> bool) {
|
pub fn retain(&mut self, mut f: impl FnMut(ClientId, &mut Client<C>) -> bool) {
|
||||||
|
|
|
@ -121,7 +121,7 @@ impl<C: Config> Entities<C> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Removes all entities from the server for which `f` returns `true`.
|
/// Removes all entities from the server for which `f` returns `false`.
|
||||||
///
|
///
|
||||||
/// All entities are visited in an unspecified order.
|
/// All entities are visited in an unspecified order.
|
||||||
pub fn retain(&mut self, mut f: impl FnMut(EntityId, &mut Entity<C>) -> bool) {
|
pub fn retain(&mut self, mut f: impl FnMut(EntityId, &mut Entity<C>) -> bool) {
|
||||||
|
|
|
@ -175,7 +175,7 @@ impl<C: Config> PlayerList<C> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Removes all entries from the player list for which `f` returns `true`.
|
/// Removes all entries from the player list for which `f` returns `false`.
|
||||||
///
|
///
|
||||||
/// All entries are visited in an unspecified order.
|
/// All entries are visited in an unspecified order.
|
||||||
pub fn retain(&mut self, mut f: impl FnMut(Uuid, &mut PlayerListEntry) -> bool) {
|
pub fn retain(&mut self, mut f: impl FnMut(Uuid, &mut PlayerListEntry) -> bool) {
|
||||||
|
|
|
@ -67,7 +67,7 @@ impl<C: Config> Worlds<C> {
|
||||||
self.slab.remove(world.0).is_some()
|
self.slab.remove(world.0).is_some()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Removes all worlds from the server for which `f` returns `true`.
|
/// Removes all worlds from the server for which `f` returns `false`.
|
||||||
///
|
///
|
||||||
/// All worlds are visited in an unspecified order.
|
/// All worlds are visited in an unspecified order.
|
||||||
pub fn retain(&mut self, mut f: impl FnMut(WorldId, &mut World<C>) -> bool) {
|
pub fn retain(&mut self, mut f: impl FnMut(WorldId, &mut World<C>) -> bool) {
|
||||||
|
|
Loading…
Reference in a new issue