From 6f05851282cf923970e935d9075ae0f77f6bddb0 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Fri, 29 Aug 2025 14:28:36 -0300 Subject: [PATCH] fix: remove redundant validation in delete mode Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) --- src/modes/delete.rs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/modes/delete.rs b/src/modes/delete.rs index 0f82810..a9322f3 100644 --- a/src/modes/delete.rs +++ b/src/modes/delete.rs @@ -18,19 +18,8 @@ pub fn mode_delete( conn: &mut Connection, data_path: PathBuf, ) -> Result<()> { - if ids.is_empty() { - cmd.error( - ErrorKind::InvalidValue, - "No ID given, you must supply atleast one ID when using --delete", - ) - .exit(); - } else if !tags.is_empty() { - cmd.error( - ErrorKind::InvalidValue, - "Tags given but not supported, you must supply atleast one ID when using --delete", - ) - .exit(); - } + // Validation is now handled at the argument parsing level + // So we can assume ids is not empty and tags is empty let item_service = ItemService::new(data_path);