refactor: Improved error handling project-wide and cleaned up some regexes with unnecessary escapes (tail_logs and interpolate_env_vars)
This commit is contained in:
@@ -106,11 +106,11 @@ fn draw_library(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
.map_or(0f64, |stats| convert_to_gb(stats.size_on_disk));
|
||||
let quality_profile = quality_profile_map
|
||||
.get_by_left(&series.quality_profile_id)
|
||||
.unwrap()
|
||||
.expect("Quality profile ID must exist in quality_profile_map")
|
||||
.to_owned();
|
||||
let language_profile = language_profile_map
|
||||
.get_by_left(&series.language_profile_id)
|
||||
.unwrap()
|
||||
.expect("Language profile ID must exist in language_profile_map")
|
||||
.to_owned();
|
||||
let empty_tag = String::new();
|
||||
let tags = if !series.tags.is_empty() {
|
||||
@@ -119,7 +119,7 @@ fn draw_library(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
.iter()
|
||||
.map(|tag_id| {
|
||||
tags_map
|
||||
.get_by_left(&tag_id.as_i64().unwrap())
|
||||
.get_by_left(&tag_id.as_i64().expect("Tag ID must be a valid i64"))
|
||||
.unwrap_or(&empty_tag)
|
||||
.clone()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user