diff --git a/src/secret_service.rs b/src/secret_service.rs index a27870e..2d600c4 100644 --- a/src/secret_service.rs +++ b/src/secret_service.rs @@ -402,7 +402,7 @@ impl SsCredential { let attributes = self.search_attributes(true); let search = collection.search_items(attributes).map_err(decode_error)?; if require_unique { - if search.len() == 0 && require_unique { + if search.is_empty() && require_unique { return Err(ErrorCode::NoEntry); } else if search.len() > 1 { let mut creds: Vec> = vec![]; @@ -520,7 +520,7 @@ pub fn get_item_password(item: &Item) -> Result { decode_password(bytes) } -//// Given an existing item, retrieve its secret. +/// Given an existing item, retrieve its secret. pub fn get_item_secret(item: &Item) -> Result> { let secret = item.get_secret().map_err(decode_error)?; Ok(secret)