fix: resolve borrow of partially moved value errors and update error variant

Co-authored-by: aider (openai/andrew/openrouter/google/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-25 13:13:46 -03:00
parent 1880d1059e
commit ff85bb611b
4 changed files with 12 additions and 13 deletions

View File

@@ -154,9 +154,10 @@ fn show_item_structured(
data_path: PathBuf,
output_format: OutputFormat,
) -> Result<()> {
let item_tags: Vec<String> = item_with_meta.tags.iter().map(|t| t.name.clone()).collect();
let meta_map = item_with_meta.meta_as_map();
let item = item_with_meta.item;
let item_id = item.id.unwrap();
let item_tags: Vec<String> = item_with_meta.tags.iter().map(|t| t.name.clone()).collect();
let mut item_path_buf = data_path.clone();
item_path_buf.push(item_id.to_string());
@@ -172,8 +173,6 @@ fn show_item_structured(
None => "Missing".to_string(),
};
let meta_map = item_with_meta.meta_as_map();
let item_info = ItemInfo {
id: item_id,
timestamp: item