Clippy fixes

This commit is contained in:
mdecimus
2024-12-01 20:13:06 +13:00
parent 4f02e4c96f
commit 03d9dabed3
27 changed files with 115 additions and 119 deletions

View File

@@ -108,7 +108,7 @@ impl Config {
&'y self,
prefix: impl AsKey,
suffix: &'y str,
) -> impl Iterator<Item = &str> + 'x {
) -> impl Iterator<Item = &'x str> + 'x {
let mut last_key = "";
let prefix = prefix.as_prefix();
@@ -130,14 +130,17 @@ impl Config {
})
}
pub fn prefix<'x, 'y: 'x>(&'y self, prefix: impl AsKey) -> impl Iterator<Item = &str> + 'x {
pub fn prefix<'x, 'y: 'x>(&'y self, prefix: impl AsKey) -> impl Iterator<Item = &'x str> + 'x {
let prefix = prefix.as_prefix();
self.keys
.keys()
.filter_map(move |key| key.strip_prefix(&prefix))
}
pub fn set_values<'x, 'y: 'x>(&'y self, prefix: impl AsKey) -> impl Iterator<Item = &str> + 'x {
pub fn set_values<'x, 'y: 'x>(
&'y self,
prefix: impl AsKey,
) -> impl Iterator<Item = &'x str> + 'x {
let prefix = prefix.as_prefix();
#[cfg(debug_assertions)]