diff --git a/rslib/src/config/deck.rs b/rslib/src/config/deck.rs index 89e92e2e3..8c5a7e153 100644 --- a/rslib/src/config/deck.rs +++ b/rslib/src/config/deck.rs @@ -19,7 +19,7 @@ impl DeckConfigKey { } impl Collection { - pub(crate) fn clear_aux_config_for_deck(&self, ntid: DeckId) -> Result<()> { + pub(crate) fn clear_aux_config_for_deck(&mut self, ntid: DeckId) -> Result<()> { self.remove_config_prefix(&build_aux_deck_key(ntid, "")) } diff --git a/rslib/src/config/mod.rs b/rslib/src/config/mod.rs index 6a61e18f0..d68ae4414 100644 --- a/rslib/src/config/mod.rs +++ b/rslib/src/config/mod.rs @@ -117,9 +117,9 @@ impl Collection { } /// Remove all keys starting with provided prefix, which must end with '_'. - pub(crate) fn remove_config_prefix(&self, key: &str) -> Result<()> { + pub(crate) fn remove_config_prefix(&mut self, key: &str) -> Result<()> { for (key, _val) in self.storage.get_config_prefix(key)? { - self.storage.remove_config(&key)?; + self.remove_config(key.as_str())?; } Ok(()) } diff --git a/rslib/src/config/notetype.rs b/rslib/src/config/notetype.rs index 62259e21e..2d289beb4 100644 --- a/rslib/src/config/notetype.rs +++ b/rslib/src/config/notetype.rs @@ -33,7 +33,7 @@ impl Collection { .map(|_| ()) } - pub(crate) fn clear_aux_config_for_notetype(&self, ntid: NotetypeId) -> Result<()> { + pub(crate) fn clear_aux_config_for_notetype(&mut self, ntid: NotetypeId) -> Result<()> { self.remove_config_prefix(&build_aux_notetype_key(ntid, "")) }