From c73ab25c9dbe40284cfd38beaf31e2a20a9810de Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 22 Sep 2026 18:22:46 +0200 Subject: refactor(engine): fix portion of clippy lints --- engine/src/rendering/object.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engine/src/rendering/object.rs') diff --git a/engine/src/rendering/object.rs b/engine/src/rendering/object.rs index 61e7ed5..d496eda 100644 --- a/engine/src/rendering/object.rs +++ b/engine/src/rendering/object.rs @@ -26,6 +26,7 @@ impl Id )) } + #[must_use] pub fn into_asset_id(self) -> Option { match self { @@ -55,16 +56,19 @@ pub struct Store impl Store { + #[must_use] pub fn get_obj(&self, id: &Id) -> Option<&Object> { self.objects.get(id).and_then(|obj| obj.as_ref()) } + #[must_use] pub fn contains_maybe_pending_with_id(&self, id: &Id) -> bool { self.objects.contains_key(id) } + #[must_use] pub fn contains_non_pending_with_id(&self, id: &Id) -> bool { self.objects.get(id).and_then(|obj| obj.as_ref()).is_some() @@ -96,16 +100,19 @@ pub struct Object impl Object { + #[must_use] pub fn from_raw(raw: RawValue, kind: Kind) -> Self { Self { raw, kind } } + #[must_use] pub fn as_raw(&self) -> RawValue { self.raw } + #[must_use] pub fn kind(&self) -> Kind { self.kind -- cgit v1.2.3-18-g5258