fix: resolve compilation errors in info.rs by adding imports and fixing type handling
This commit is contained in:
@@ -4,6 +4,7 @@ use clap::error::ErrorKind;
|
|||||||
use clap::Command;
|
use clap::Command;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
use crate::db::Item;
|
||||||
|
|
||||||
use crate::compression_engine::{get_compression_engine, CompressionType};
|
use crate::compression_engine::{get_compression_engine, CompressionType};
|
||||||
use crate::db::{get_item, get_item_last, get_item_matching};
|
use crate::db::{get_item, get_item_last, get_item_matching};
|
||||||
@@ -99,7 +100,9 @@ fn show_item(
|
|||||||
size_cell,
|
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![
|
table.add_row(Row::new(vec![
|
||||||
Cell::new("Compression").with_style(Attr::Bold),
|
Cell::new("Compression").with_style(Attr::Bold),
|
||||||
Cell::new(&compression_type.to_string()),
|
Cell::new(&compression_type.to_string()),
|
||||||
|
|||||||
Reference in New Issue
Block a user