From eac71c07f68e330137b4b39ff8cc41b92672ba3d Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 26 Jul 2025 08:21:19 +0300 Subject: [PATCH] fix incorrect assertion --- src/profile/proxy/misc.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/profile/proxy/misc.rs b/src/profile/proxy/misc.rs index 8af711ab..209fc433 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).unwrap())) + m.insert(Memory::from_db_row(&row.key, row.value).unwrap()); // * panics if the DB was malformed or changed unexpectedly } } @@ -47,12 +47,10 @@ impl Misc { Ok(()) } - pub fn set_highlight_request_entry(&self, value: bool) { - assert!( - self.memory - .borrow_mut() - .insert(Memory::highlight_request_entry(value)), - ) + pub fn set_highlight_request_entry(&self, value: bool) -> bool { + self.memory + .borrow_mut() + .insert(Memory::highlight_request_entry(value)) } // Getters