From 4f4478718e88344082b82af455192ba10efd41c8 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Mon, 23 Sep 2024 06:07:23 +0000 Subject: [PATCH] Apply latest cargo fmt --- src/adc.rs | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/adc.rs b/src/adc.rs index d148b6de71..10dced11cc 100644 --- a/src/adc.rs +++ b/src/adc.rs @@ -930,7 +930,10 @@ pub mod continuous { { type Adc = <

::P as ADCPin>::Adc; - type Iterator<'a> = core::iter::Once<(adc_channel_t, adc_atten_t)> where Self: 'a; + type Iterator<'a> + = core::iter::Once<(adc_channel_t, adc_atten_t)> + where + Self: 'a; fn iter(&self) -> Self::Iterator<'_> { core::iter::once((P::P::CHANNEL, attenuation::NONE)) @@ -943,10 +946,13 @@ pub mod continuous { { type Adc = C::Adc; - type Iterator<'a> = core::iter::Map< + type Iterator<'a> + = core::iter::Map< C::Iterator<'a>, fn((adc_channel_t, adc_atten_t)) -> (adc_channel_t, adc_atten_t), - > where Self: 'a; + > + where + Self: 'a; fn iter(&self) -> Self::Iterator<'_> { self.0.iter().map(Attenuated::::atten) @@ -961,7 +967,14 @@ pub mod continuous { { type Adc = C::Adc; - type Iterator<'a> = core::iter::FlatMap, ::Iterator<'a>, fn(&'a C) -> C::Iterator<'a>> where Self: 'a; + type Iterator<'a> + = core::iter::FlatMap< + core::slice::Iter<'a, C>, + ::Iterator<'a>, + fn(&'a C) -> C::Iterator<'a>, + > + where + Self: 'a; fn iter(&self) -> Self::Iterator<'_> { self.0.iter().flat_map(AdcChannels::iter) @@ -989,7 +1002,10 @@ pub mod continuous { { type Adc = A; - type Iterator<'a> = core::iter::Empty<(adc_channel_t, adc_atten_t)> where Self: 'a; + type Iterator<'a> + = core::iter::Empty<(adc_channel_t, adc_atten_t)> + where + Self: 'a; fn iter(&self) -> Self::Iterator<'_> { core::iter::empty() @@ -1022,7 +1038,10 @@ pub mod continuous { { type Adc = F::Adc; - type Iterator<'a> = core::iter::Chain, S::Iterator<'a>> where Self: 'a; + type Iterator<'a> + = core::iter::Chain, S::Iterator<'a>> + where + Self: 'a; fn iter(&self) -> Self::Iterator<'_> { self.first.iter().chain(self.second.iter())