diff options
| author | HampusM <hampus@hampusmat.com> | 2026-09-22 18:22:46 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-09-22 18:22:46 +0200 |
| commit | c73ab25c9dbe40284cfd38beaf31e2a20a9810de (patch) | |
| tree | 51c5817a0c252a172c03a47e36886e563a4e623d /engine/src/rendering/object.rs | |
| parent | 2ccda0cd5f81909fddc74d95f960f781a64bcae1 (diff) | |
refactor(engine): fix portion of clippy lints
Diffstat (limited to 'engine/src/rendering/object.rs')
| -rw-r--r-- | engine/src/rendering/object.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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<AssetId> { 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 |
