diff options
author | HampusM <hampus@hampusmat.com> | 2025-04-22 18:06:59 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-04-22 18:06:59 +0200 |
commit | fb47933690dfb54206e9f136902671b19ddd34e0 (patch) | |
tree | ffdb6640ea896b69b0267a9526657b9ed454184f /ecs/src/component.rs | |
parent | d9ac86a1f6ec541a399794f9f81381753cfea5f6 (diff) |
refactor(ecs): fix clippy lints
Diffstat (limited to 'ecs/src/component.rs')
-rw-r--r-- | ecs/src/component.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ecs/src/component.rs b/ecs/src/component.rs index de4384b..a0ed752 100644 --- a/ecs/src/component.rs +++ b/ecs/src/component.rs @@ -99,6 +99,9 @@ pub trait HandleFromEntityComponentRef<'comp>: Sized type Error: Error; /// Creates a new handle instance from a [`EntityComponentRef`]. + /// + /// # Errors + /// See the implementation's [`Self::Error`] type. fn from_entity_component_ref( entity_component_ref: Option<EntityComponentRef<'comp>>, world: &'comp World, @@ -306,16 +309,19 @@ pub struct Parts impl Parts { + #[must_use] pub fn id(&self) -> Uid { self.id } + #[must_use] pub fn name(&self) -> &'static str { self.name } + #[must_use] pub fn builder() -> PartsBuilder { PartsBuilder::default() @@ -335,12 +341,14 @@ pub struct PartsBuilder impl PartsBuilder { + #[must_use] pub fn name(mut self, name: &'static str) -> Self { self.name = name; self } + #[must_use] pub fn build<Data: 'static>(self, id: Uid, data: Data) -> Parts { Parts { |