fix: resolve compilation errors by adding missing imports and fixing Result types

- Import `anyhow`, `clap::Command`, `log::debug`, and I/O traits
- Fix all `Result` return types to include error type `anyhow::Error`
- Replace `anyhow::anyhow!` with `anyhow!` macro calls
- Fix transaction handling in `mode_save`
- Add missing trait imports for I/O operations and string parsing

Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-10 00:19:00 -03:00
parent 58f047ba6d
commit e1c0c81445
3 changed files with 35 additions and 25 deletions

View File

@@ -4,6 +4,7 @@ use crate::db::Item;
use crate::db::Meta;
use crate::db::store_meta;
use crate::meta_plugin::MetaPluginType;
use anyhow::{anyhow, Result};
use clap::Command;
use clap::error::ErrorKind;
use humansize::{BINARY, FormatSizeOptions};
@@ -115,7 +116,7 @@ pub fn store_item_meta_value(
) -> Result<(), anyhow::Error> {
// Save digest to meta
let meta = Meta {
id: item.id.unwrap(),
id: item.id.ok_or_else(|| anyhow!("Item missing ID"))?,
name: meta_name,
value: meta_value,
};