From 7718daddda90fd5e6c6ba8549253791bf1fcbca9 Mon Sep 17 00:00:00 2001 From: davidemazzocchi Date: Fri, 6 Feb 2026 08:57:12 +0100 Subject: [PATCH] chore: rename key parameter to id while checking for existence --- 01.workspace/heave/src/imp/catalog_contains_key.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/01.workspace/heave/src/imp/catalog_contains_key.rs b/01.workspace/heave/src/imp/catalog_contains_key.rs index 5d1744b..905056c 100644 --- a/01.workspace/heave/src/imp/catalog_contains_key.rs +++ b/01.workspace/heave/src/imp/catalog_contains_key.rs @@ -1,22 +1,22 @@ use crate::*; impl Catalog { - /// Checks if the catalog contains an entity with the specified key. + /// Checks if the catalog contains an entity with the specified ID. /// /// # Arguments /// - /// * `k` - The key to check for. + /// * `id` - The ID to check for. /// /// # Returns /// - /// `Ok(true)` if an entity with the specified key exists in the catalog, + /// `Ok(true)` if an entity with the specified ID exists in the catalog, /// `Ok(false)` otherwise. /// /// # Errors /// /// Returns `Err(FailedTo::LockCatalog)` if the catalog's internal mutex /// could not be locked. - pub fn contains_key(&self, k: &str) -> Result { - self.with_items(|items| Ok(items.contains_key(k))) + pub fn contains_key(&self, id: &str) -> Result { + self.with_items(|items| Ok(items.contains_key(id))) } }