chore: fix missing periods
Some checks are pending
Build Zenyx ⚡ / 🧪 Run Cargo Tests (push) Waiting to run
Build Zenyx ⚡ / 🏗️ Build aarch64-pc-windows-msvc (push) Blocked by required conditions
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Blocked by required conditions
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Blocked by required conditions
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Blocked by required conditions
Build Zenyx ⚡ / 🧪 Run Cargo Tests (pull_request) Successful in 7m4s
Build Zenyx ⚡ / 🏗️ Build aarch64-pc-windows-msvc (pull_request) Successful in 7m26s
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (pull_request) Successful in 7m37s
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (pull_request) Successful in 7m52s
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (pull_request) Successful in 7m54s
Some checks are pending
Build Zenyx ⚡ / 🧪 Run Cargo Tests (push) Waiting to run
Build Zenyx ⚡ / 🏗️ Build aarch64-pc-windows-msvc (push) Blocked by required conditions
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Blocked by required conditions
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Blocked by required conditions
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Blocked by required conditions
Build Zenyx ⚡ / 🧪 Run Cargo Tests (pull_request) Successful in 7m4s
Build Zenyx ⚡ / 🏗️ Build aarch64-pc-windows-msvc (pull_request) Successful in 7m26s
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (pull_request) Successful in 7m37s
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (pull_request) Successful in 7m52s
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (pull_request) Successful in 7m54s
This commit is contained in:
parent
c32f8126e9
commit
8b16afb604
2 changed files with 12 additions and 12 deletions
|
@ -11,7 +11,7 @@ homepage = "https://zenyx-engine.github.io/"
|
|||
repository = "https://codeberg.org/Caznix/Zenyx"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
# crate-type = ["cdylib"]
|
||||
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
|
|
|
@ -15,7 +15,7 @@ type SparsePage<A> = Option<(Box<[Option<NonZeroUsize>; SPARSE_PAGESIZE], A>, us
|
|||
/// The sparse allocator is mainly used for bulk allocations in the system's page size
|
||||
/// for the lookup array. It will also be used for the array of pointers into those
|
||||
/// bulk allocations. Additionally it will be used for the reverse map that generates keys
|
||||
/// from the value in the internal packed array
|
||||
/// from the value in the internal packed array.
|
||||
///
|
||||
/// The packed allocator will exclusively be used to store the values of type `T`.
|
||||
///
|
||||
|
@ -32,9 +32,9 @@ where
|
|||
/// The paginated array of keys. The value at the key is an index into the dense array minus
|
||||
/// one where the value corresponding to that key is stored.
|
||||
sparse: Vec<SparsePage<SparseAlloc>, SparseAlloc>,
|
||||
/// The dense array where the values corresponding to the keys are stored
|
||||
/// The dense array where the values corresponding to the keys are stored.
|
||||
dense: Vec<T, PackedAlloc>,
|
||||
/// The reverse map to get the index in the sparse array from the index in the dense array
|
||||
/// The reverse map to get the index in the sparse array from the index in the dense array.
|
||||
dense_to_id: Vec<usize, SparseAlloc>,
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
/// Gets the value with the key `id`
|
||||
/// Gets the value with the key `id`.
|
||||
///
|
||||
/// ```
|
||||
/// use zenyx::collections::SparseSet;
|
||||
|
@ -161,7 +161,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
/// Gets the index in the dense array for a key `id`
|
||||
/// Gets the index in the dense array for a key `id`.
|
||||
///
|
||||
/// ```
|
||||
/// use zenyx::collections::SparseSet;
|
||||
|
@ -178,7 +178,7 @@ where
|
|||
}
|
||||
|
||||
/// This reduces the usage count for a page in the sparse array, deallocating
|
||||
/// it if it is not used anymore
|
||||
/// it if it is not used anymore.
|
||||
fn reduce_page_usage_count(&mut self, id: usize) {
|
||||
let page = id / SPARSE_PAGESIZE;
|
||||
let Some(usage) = &mut self.sparse[page] else {
|
||||
|
@ -191,7 +191,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
/// Increase the page usage count for a page in the sparse array
|
||||
/// Increase the page usage count for a page in the sparse array.
|
||||
fn increase_page_usage_count(&mut self, id: usize) {
|
||||
let page = id / SPARSE_PAGESIZE;
|
||||
if page >= self.sparse.len() {
|
||||
|
@ -243,7 +243,7 @@ where
|
|||
self.len() == 0
|
||||
}
|
||||
|
||||
/// Returns the number of values in this sparse set
|
||||
/// Returns the number of values in this sparse set.
|
||||
///
|
||||
/// ```
|
||||
/// use zenyx::collections::SparseSet;
|
||||
|
@ -258,7 +258,7 @@ where
|
|||
self.dense.len()
|
||||
}
|
||||
|
||||
/// Checks if the sparse set contains a value with key `id`
|
||||
/// Checks if the sparse set contains a value with key `id`.
|
||||
///
|
||||
/// ```
|
||||
/// use zenyx::collections::SparseSet;
|
||||
|
@ -315,7 +315,7 @@ where
|
|||
&self.dense
|
||||
}
|
||||
|
||||
/// Mutable version of [`Self::keys`]
|
||||
/// Mutable version of [`Self::keys`].
|
||||
///
|
||||
/// ```
|
||||
/// use zenyx::collections::SparseSet;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue