@@ -40,10 +40,10 @@ impl<'d, T: CoreInstance> Builder<'d, T> {
4040 /// You may use convenience methods [`ch1_pin()`][Self::ch1_pin()] to `ch4_pin()` to aid type
4141 /// inference.
4242 pub fn pin < C : ChannelMarker > (
43- & mut self ,
43+ mut self ,
4444 pin : impl Peripheral < P = impl TimerPin < T , C > > + ' d ,
4545 output_type : OutputType ,
46- ) -> & mut Self {
46+ ) -> Self {
4747 let pin = RawTimerPin :: new ( pin, AfType :: output ( output_type, Speed :: VeryHigh ) ) ;
4848 self . channel_pins [ C :: CHANNEL . index ( ) ] = Some ( pin) ;
4949 self
@@ -52,7 +52,7 @@ impl<'d, T: CoreInstance> Builder<'d, T> {
5252 /// Attach update DMA to the PWM driver.
5353 ///
5454 /// This enables you to use [`SimplePwm::waveform_up_dma()`].
55- pub fn up_dma ( & mut self , dma : impl Peripheral < P = impl UpDma < T > > + ' d ) -> & mut Self {
55+ pub fn up_dma ( mut self , dma : impl Peripheral < P = impl UpDma < T > > + ' d ) -> Self {
5656 self . up_dma = Some ( raw:: up_dma ( dma) ) ;
5757 self
5858 }
@@ -62,7 +62,7 @@ impl<'d, T: CoreInstance> Builder<'d, T> {
6262 /// This enables you to use [`SimplePwm::waveform_cc_dma()`] with the given channel. You may
6363 /// use convenience methods [`ch1_cc_dma()`][Self::ch1_cc_dma()] to `ch4_cc_dma()`] to aid type
6464 /// inference.
65- pub fn cc_dma < C : ChannelMarker > ( & mut self , dma : impl Peripheral < P = impl CcDma < T , C > > + ' d ) -> & mut Self {
65+ pub fn cc_dma < C : ChannelMarker > ( mut self , dma : impl Peripheral < P = impl CcDma < T , C > > + ' d ) -> Self {
6666 self . cc_dmas [ C :: CHANNEL . index ( ) ] = Some ( raw:: cc_dma ( dma) ) ;
6767 self
6868 }
@@ -78,10 +78,10 @@ macro_rules! channel_impl {
7878 " to the PWM driver.\n \n See [`pin()`][Self::pin()] for details." ,
7979 ) ]
8080 pub fn $chx_pin(
81- & mut self ,
81+ self ,
8282 pin: impl Peripheral <P = impl TimerPin <T , $channel>> + ' d,
8383 output_type: OutputType ,
84- ) -> & mut Self {
84+ ) -> Self {
8585 self . pin:: <$channel>( pin, output_type)
8686 }
8787
@@ -90,7 +90,7 @@ macro_rules! channel_impl {
9090 stringify!( $channel) ,
9191 " to the PWM driver.\n \n See [`cc_dma()`][Self::cc_dma()] for details." ,
9292 ) ]
93- pub fn $chx_cc_dma( & mut self , dma: impl Peripheral <P = impl CcDma <T , $channel>> + ' d) -> & mut Self {
93+ pub fn $chx_cc_dma( self , dma: impl Peripheral <P = impl CcDma <T , $channel>> + ' d) -> Self {
9494 self . cc_dma:: <$channel>( dma)
9595 }
9696 }
0 commit comments