fix: resolve ownership and borrowing errors and add serde traits

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:06:54 -03:00
parent 53c63360cb
commit ee0545b739
7 changed files with 19 additions and 15 deletions

View File

@@ -74,7 +74,7 @@ fn show_item(
let item = item_with_meta.item;
let item_id = item.id.unwrap();
let item_tags: Vec<String> = item_with_meta.tags.into_iter().map(|t| t.name).collect();
let item_tags: Vec<String> = item_with_meta.tags.iter().map(|t| t.name.clone()).collect();
let mut table = Table::new();
if std::io::stdout().is_terminal() {
@@ -156,7 +156,7 @@ fn show_item_structured(
) -> Result<()> {
let item = item_with_meta.item;
let item_id = item.id.unwrap();
let item_tags: Vec<String> = item_with_meta.tags.into_iter().map(|t| t.name).collect();
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());