Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
GnomedDev authored and zonyitoo committed Mar 11, 2024
1 parent 700a8bf commit 599aeaf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ pub struct PropertiesIntoIter {
impl Iterator for PropertiesIntoIter {
type Item = (String, String);

#[cfg_attr(not(feature = "case-insensitive"), allow(clippy::useless_conversion))]
fn next(&mut self) -> Option<Self::Item> {
self.inner.next().map(|(k, v)| (k.into(), v))
}
Expand All @@ -540,6 +541,7 @@ impl Iterator for PropertiesIntoIter {
}

impl DoubleEndedIterator for PropertiesIntoIter {
#[cfg_attr(not(feature = "case-insensitive"), allow(clippy::useless_conversion))]
fn next_back(&mut self) -> Option<Self::Item> {
self.inner.next_back().map(|(k, v)| (k.into(), v))
}
Expand Down Expand Up @@ -715,7 +717,7 @@ impl Ini {
/// Get the entry
#[cfg(not(feature = "case-insensitive"))]
pub fn entry(&mut self, name: Option<String>) -> SectionEntry<'_> {
SectionEntry::from(self.sections.entry(name.map(|s| s)))
SectionEntry::from(self.sections.entry(name))
}

/// Get the entry
Expand Down

0 comments on commit 599aeaf

Please sign in to comment.