mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
remove extra copy
This commit is contained in:
parent
8df429e98f
commit
5e32113747
3 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ pub enum Memory {
|
|||
impl Memory {
|
||||
// Constructors
|
||||
|
||||
pub fn from_db_row(key: &str, value: Option<&str>) -> Option<Self> {
|
||||
pub fn from_db_row(key: &str, value: Option<String>) -> Option<Self> {
|
||||
if key == HIGHLIGHT_REQUEST_ENTRY {
|
||||
Some(Self::HighlightRequestEntry(Bool::from_db_value(value)))
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -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<String>) -> Self {
|
||||
if key.is_some_and(|k| k == TRUE) {
|
||||
Self::True
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue