mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(clippy): add iter_without_into_iter (#9195)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
This commit is contained in:
@ -65,6 +65,23 @@ impl Withdrawals {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoIterator for &'a Withdrawals {
|
||||
type Item = &'a Withdrawal;
|
||||
type IntoIter = core::slice::Iter<'a, Withdrawal>;
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.iter()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoIterator for &'a mut Withdrawals {
|
||||
type Item = &'a mut Withdrawal;
|
||||
type IntoIter = core::slice::IterMut<'a, Withdrawal>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.iter_mut()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user