File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -455,7 +455,7 @@ impl<SAI: I2sInstance> Sai<SAI, I2S> {
455
455
let _pins = pins. convert ( ) ;
456
456
457
457
i2s_config_channel (
458
- & per_sai. rb . cha ( ) ,
458
+ per_sai. rb . cha ( ) ,
459
459
I2SMode :: Master ,
460
460
& per_sai. interface . master ,
461
461
mclk_div,
@@ -464,7 +464,7 @@ impl<SAI: I2sInstance> Sai<SAI, I2S> {
464
464
465
465
if let Some ( slave) = & per_sai. interface . slave {
466
466
i2s_config_channel (
467
- & per_sai. rb . chb ( ) ,
467
+ per_sai. rb . chb ( ) ,
468
468
I2SMode :: Slave ,
469
469
slave,
470
470
0 ,
@@ -518,7 +518,7 @@ impl<SAI: I2sInstance> Sai<SAI, I2S> {
518
518
let _pins = pins. convert ( ) ;
519
519
520
520
i2s_config_channel (
521
- & per_sai. rb . chb ( ) ,
521
+ per_sai. rb . chb ( ) ,
522
522
I2SMode :: Master ,
523
523
& per_sai. interface . master ,
524
524
mclk_div,
@@ -527,7 +527,7 @@ impl<SAI: I2sInstance> Sai<SAI, I2S> {
527
527
528
528
if let Some ( slave) = & per_sai. interface . slave {
529
529
i2s_config_channel (
530
- & per_sai. rb . cha ( ) ,
530
+ per_sai. rb . cha ( ) ,
531
531
I2SMode :: Slave ,
532
532
slave,
533
533
0 ,
Original file line number Diff line number Diff line change @@ -210,10 +210,8 @@ where
210
210
where
211
211
F : FnOnce ( & CH ) -> T ,
212
212
{
213
- match self . slave_channel {
214
- Some ( channel) => Some ( func ( & self . rb . ch [ channel as usize ] ) ) ,
215
- None => None ,
216
- }
213
+ self . slave_channel
214
+ . map ( |channel| func ( & self . rb . ch [ channel as usize ] ) )
217
215
}
218
216
219
217
/// Start listening for `event` on a given `channel`
You can’t perform that action at this time.
0 commit comments