fix: panic guards, dedup, and unsafe documentation
- diff.rs: graceful error instead of expect() on item ID in spawned thread - common.rs: lazy_static regex, avoid unwrap on regex captures - db.rs: ok_or_else guard on item.id in delete_item - list/get/info/export/client/list: use settings.meta_filter() helper - item_service.rs: expect() on meta lock instead of silent swallow - filter_plugin/mod.rs: extract parse_encoding_option() helper - main.rs: document unsafe libc::umask block with safety rationale
This commit is contained in:
@@ -89,12 +89,7 @@ pub fn mode_list(
|
||||
data_path: std::path::PathBuf,
|
||||
) -> Result<()> {
|
||||
let item_service = ItemService::new(data_path.clone());
|
||||
let meta_filter: std::collections::HashMap<String, Option<String>> = settings
|
||||
.meta
|
||||
.iter()
|
||||
.map(|(k, v)| (k.clone(), v.clone()))
|
||||
.collect();
|
||||
let items_with_meta = item_service.get_items(conn, ids, tags, &meta_filter)?;
|
||||
let items_with_meta = item_service.get_items(conn, ids, tags, &settings.meta_filter())?;
|
||||
|
||||
if settings.ids_only {
|
||||
for item_with_meta in &items_with_meta {
|
||||
|
||||
Reference in New Issue
Block a user