From c167f28d17cc07de9eeb05e8b7862f3b652db30e Mon Sep 17 00:00:00 2001 From: "Andrew Phillips (aider)" Date: Tue, 13 May 2025 18:10:37 -0300 Subject: [PATCH] fix: resolve compilation errors in info.rs by adding imports and fixing type handling --- src/modes/info.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modes/info.rs b/src/modes/info.rs index 17418de..d5f3e06 100644 --- a/src/modes/info.rs +++ b/src/modes/info.rs @@ -4,6 +4,7 @@ use clap::error::ErrorKind; use clap::Command; use std::path::PathBuf; use std::str::FromStr; +use crate::db::Item; use crate::compression_engine::{get_compression_engine, CompressionType}; use crate::db::{get_item, get_item_last, get_item_matching}; @@ -99,7 +100,9 @@ fn show_item( size_cell, ])); - let compression_type = CompressionType::from_str(&item.compression)?; + let compression_type = CompressionType::from_str(&item.compression) + .map_err(|e| anyhow!("Failed to parse compression type: {}", e))?; + table.add_row(Row::new(vec![ Cell::new("Compression").with_style(Attr::Bold), Cell::new(&compression_type.to_string()),