Skip to content

Commit

Permalink
Fixes and improvements to the inline documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamreichold committed Sep 11, 2023
1 parent 7250cb3 commit c34bddc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rs-ecs"
description = "reasonably simple entity component system"
version = "0.7.4"
version = "0.7.5"
edition = "2018"
rust-version = "1.51"
authors = ["Adam Reichold <adam.reichold@t-online.de>"]
Expand Down
5 changes: 4 additions & 1 deletion src/archetype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ impl Archetype {
}

impl Archetype {
#[allow(clippy::needless_pass_by_ref_mut)]
pub unsafe fn move_(src: &mut Self, dst: &mut Self, src_idx: u32, dst_idx: u32) {
debug_assert!(src_idx < src.len);
debug_assert!(dst_idx < dst.len);
Expand Down Expand Up @@ -394,6 +395,8 @@ fn invalid_ptr(addr: usize) -> *mut u8 {
}

/// Collects component types which can be cloned or copied
///
/// Populating such an object with all used component types is required to use [`World::clone`][crate::World::clone].
pub struct Cloner {
clone: TypeIdMap<unsafe fn(*const u8, *mut u8, usize)>,
}
Expand All @@ -420,7 +423,7 @@ impl Default for Cloner {
impl Cloner {
/// Adds a component type which is cloneable
///
/// If `C` is actually copyable, using [`add_copyable`] is more efficient.
/// If `C` is actually copyable, using [`add_copyable`][Self::add_copyable] is more efficient.
pub fn add_cloneable<C>(&mut self)
where
C: Clone + 'static,
Expand Down
2 changes: 1 addition & 1 deletion src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ where

/// Create a map of the entities matching the query.
///
/// This is an alternative to [get](World::get) and [get_mut](World::get_mut) for repeated calls, to amortize the set-up costs.
/// This is an alternative to [`query_one`](World::query_one) for repeated calls, to amortize the set-up costs of random access.
///
/// # Examples
///
Expand Down

0 comments on commit c34bddc

Please sign in to comment.