From fb47933690dfb54206e9f136902671b19ddd34e0 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 22 Apr 2025 18:06:59 +0200 Subject: refactor(ecs): fix clippy lints --- ecs/src/component.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ecs/src/component.rs') 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>, 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(self, id: Uid, data: Data) -> Parts { Parts { -- cgit v1.2.3-18-g5258