Skip to content

Commit 5e32113

Browse files
author
yggverse
committed
remove extra copy
1 parent 8df429e commit 5e32113

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/profile/proxy/misc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl Misc {
3030

3131
// update values from the DB (if exists)
3232
for row in rows {
33-
assert!(!m.insert(Memory::from_db_row(&row.key, row.value.as_deref()).unwrap()))
33+
assert!(!m.insert(Memory::from_db_row(&row.key, row.value).unwrap()))
3434
// * panics if the DB was malformed or changed unexpectedly
3535
}
3636
}

src/profile/proxy/misc/memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub enum Memory {
1313
impl Memory {
1414
// Constructors
1515

16-
pub fn from_db_row(key: &str, value: Option<&str>) -> Option<Self> {
16+
pub fn from_db_row(key: &str, value: Option<String>) -> Option<Self> {
1717
if key == HIGHLIGHT_REQUEST_ENTRY {
1818
Some(Self::HighlightRequestEntry(Bool::from_db_value(value)))
1919
} else {

src/profile/proxy/misc/memory/bool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ impl Bool {
1313
if value { Self::True } else { Self::False }
1414
}
1515

16-
pub fn from_db_value(key: Option<&str>) -> Self {
16+
pub fn from_db_value(key: Option<String>) -> Self {
1717
if key.is_some_and(|k| k == TRUE) {
1818
Self::True
1919
} else {

0 commit comments

Comments
 (0)