diff --git a/src/profile/proxy/misc.rs b/src/profile/proxy/misc.rs index 416ebd60..8af711ab 100644 --- a/src/profile/proxy/misc.rs +++ b/src/profile/proxy/misc.rs @@ -30,7 +30,7 @@ impl Misc { // update values from the DB (if exists) for row in rows { - assert!(!m.insert(Memory::from_db_row(&row.key, row.value.as_deref()).unwrap())) + assert!(!m.insert(Memory::from_db_row(&row.key, row.value).unwrap())) // * panics if the DB was malformed or changed unexpectedly } } diff --git a/src/profile/proxy/misc/memory.rs b/src/profile/proxy/misc/memory.rs index fd0ac933..4fe3f7b4 100644 --- a/src/profile/proxy/misc/memory.rs +++ b/src/profile/proxy/misc/memory.rs @@ -13,7 +13,7 @@ pub enum Memory { impl Memory { // Constructors - pub fn from_db_row(key: &str, value: Option<&str>) -> Option { + pub fn from_db_row(key: &str, value: Option) -> Option { if key == HIGHLIGHT_REQUEST_ENTRY { Some(Self::HighlightRequestEntry(Bool::from_db_value(value))) } else { diff --git a/src/profile/proxy/misc/memory/bool.rs b/src/profile/proxy/misc/memory/bool.rs index 90304f18..bad945e8 100644 --- a/src/profile/proxy/misc/memory/bool.rs +++ b/src/profile/proxy/misc/memory/bool.rs @@ -13,7 +13,7 @@ impl Bool { if value { Self::True } else { Self::False } } - pub fn from_db_value(key: Option<&str>) -> Self { + pub fn from_db_value(key: Option) -> Self { if key.is_some_and(|k| k == TRUE) { Self::True } else {