Skip to content

Commit f197daf

Browse files
committed
Fix clippy warnings
1 parent 9337048 commit f197daf

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

src/flash.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ pub struct ACR {
465465
impl ACR {
466466
pub(crate) fn acr(&mut self) -> &flash::ACR {
467467
// NOTE(unsafe) this proxy grants exclusive access to this register
468-
unsafe { &(*FLASH::ptr()).acr() }
468+
unsafe { (*FLASH::ptr()).acr() }
469469
}
470470
}
471471

@@ -478,7 +478,7 @@ pub struct CR {
478478
impl CR {
479479
pub(crate) fn cr(&mut self) -> &flash::CR {
480480
// NOTE(unsafe) this proxy grants exclusive access to this register
481-
unsafe { &(*FLASH::ptr()).cr() }
481+
unsafe { (*FLASH::ptr()).cr() }
482482
}
483483
}
484484

@@ -491,7 +491,7 @@ pub struct ECCR {
491491
impl ECCR {
492492
pub(crate) fn eccr(&mut self) -> &flash::ECCR {
493493
// NOTE(unsafe) this proxy grants exclusive access to this register
494-
unsafe { &(*FLASH::ptr()).eccr() }
494+
unsafe { (*FLASH::ptr()).eccr() }
495495
}
496496
}
497497

@@ -504,7 +504,7 @@ pub struct KEYR {
504504
impl KEYR {
505505
pub(crate) fn keyr(&mut self) -> &flash::KEYR {
506506
// NOTE(unsafe) this proxy grants exclusive access to this register
507-
unsafe { &(*FLASH::ptr()).keyr() }
507+
unsafe { (*FLASH::ptr()).keyr() }
508508
}
509509
}
510510

@@ -517,7 +517,7 @@ pub struct OPTKEYR {
517517
impl OPTKEYR {
518518
pub(crate) fn optkeyr(&mut self) -> &flash::OPTKEYR {
519519
// NOTE(unsafe) this proxy grants exclusive access to this register
520-
unsafe { &(*FLASH::ptr()).optkeyr() }
520+
unsafe { (*FLASH::ptr()).optkeyr() }
521521
}
522522
}
523523

@@ -530,7 +530,7 @@ pub struct OPTR {
530530
impl OPTR {
531531
pub(crate) fn optr(&mut self) -> &flash::OPTR {
532532
// NOTE(unsafe) this proxy grants exclusive access to this register
533-
unsafe { &(*FLASH::ptr()).optr() }
533+
unsafe { (*FLASH::ptr()).optr() }
534534
}
535535
}
536536

@@ -543,7 +543,7 @@ pub struct PCROP1SR {
543543
impl PCROP1SR {
544544
pub(crate) fn pcrop1sr(&mut self) -> &flash::PCROP1SR {
545545
// NOTE(unsafe) this proxy grants exclusive access to this register
546-
unsafe { &(*FLASH::ptr()).pcrop1sr() }
546+
unsafe { (*FLASH::ptr()).pcrop1sr() }
547547
}
548548
}
549549

@@ -556,7 +556,7 @@ pub struct PCROP1ER {
556556
impl PCROP1ER {
557557
pub(crate) fn pcrop1er(&mut self) -> &flash::PCROP1ER {
558558
// NOTE(unsafe) this proxy grants exclusive access to this register
559-
unsafe { &(*FLASH::ptr()).pcrop1er() }
559+
unsafe { (*FLASH::ptr()).pcrop1er() }
560560
}
561561
}
562562

@@ -569,7 +569,7 @@ pub struct PDKEYR {
569569
impl PDKEYR {
570570
pub(crate) fn pdkeyr(&mut self) -> &flash::PDKEYR {
571571
// NOTE(unsafe) this proxy grants exclusive access to this register
572-
unsafe { &(*FLASH::ptr()).pdkeyr() }
572+
unsafe { (*FLASH::ptr()).pdkeyr() }
573573
}
574574
}
575575

@@ -582,7 +582,7 @@ pub struct SEC1R {
582582
impl SEC1R {
583583
pub(crate) fn sec1r(&mut self) -> &flash::SEC1R {
584584
// NOTE(unsafe) this proxy grants exclusive access to this register
585-
unsafe { &(*FLASH::ptr()).sec1r() }
585+
unsafe { (*FLASH::ptr()).sec1r() }
586586
}
587587
}
588588

@@ -595,7 +595,7 @@ pub struct SR {
595595
impl SR {
596596
pub(crate) fn sr(&mut self) -> &flash::SR {
597597
// NOTE(unsafe) this proxy grants exclusive access to this register
598-
unsafe { &(*FLASH::ptr()).sr() }
598+
unsafe { (*FLASH::ptr()).sr() }
599599
}
600600
}
601601

@@ -608,7 +608,7 @@ pub struct WRP1AR {
608608
impl WRP1AR {
609609
pub(crate) fn wrp1ar(&mut self) -> &flash::WRP1AR {
610610
// NOTE(unsafe) this proxy grants exclusive access to this register
611-
unsafe { &(*FLASH::ptr()).wrp1ar() }
611+
unsafe { (*FLASH::ptr()).wrp1ar() }
612612
}
613613
}
614614

@@ -621,6 +621,6 @@ pub struct WRP1BR {
621621
impl WRP1BR {
622622
pub(crate) fn wrp1br(&mut self) -> &flash::WRP1BR {
623623
// NOTE(unsafe) this proxy grants exclusive access to this register
624-
unsafe { &(*FLASH::ptr()).wrp1br() }
624+
unsafe { (*FLASH::ptr()).wrp1br() }
625625
}
626626
}

src/rcc/mod.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -526,16 +526,16 @@ pub struct AHB1 {
526526
impl AHB1 {
527527
#[inline(always)]
528528
fn enr(rcc: &RccRB) -> &rcc::AHB1ENR {
529-
&rcc.ahb1enr()
529+
rcc.ahb1enr()
530530
}
531531
#[inline(always)]
532532
fn rstr(rcc: &RccRB) -> &rcc::AHB1RSTR {
533-
&rcc.ahb1rstr()
533+
rcc.ahb1rstr()
534534
}
535535
#[allow(unused)]
536536
#[inline(always)]
537537
fn smenr(rcc: &RccRB) -> &rcc::AHB1SMENR {
538-
&rcc.ahb1smenr()
538+
rcc.ahb1smenr()
539539
}
540540
}
541541

@@ -545,16 +545,16 @@ pub struct AHB2 {
545545
impl AHB2 {
546546
#[inline(always)]
547547
fn enr(rcc: &RccRB) -> &rcc::AHB2ENR {
548-
&rcc.ahb2enr()
548+
rcc.ahb2enr()
549549
}
550550
#[inline(always)]
551551
fn rstr(rcc: &RccRB) -> &rcc::AHB2RSTR {
552-
&rcc.ahb2rstr()
552+
rcc.ahb2rstr()
553553
}
554554
#[allow(unused)]
555555
#[inline(always)]
556556
fn smenr(rcc: &RccRB) -> &rcc::AHB2SMENR {
557-
&rcc.ahb2smenr()
557+
rcc.ahb2smenr()
558558
}
559559
}
560560

@@ -565,17 +565,17 @@ impl AHB3 {
565565
#[allow(unused)]
566566
#[inline(always)]
567567
fn enr(rcc: &RccRB) -> &rcc::AHB3ENR {
568-
&rcc.ahb3enr()
568+
rcc.ahb3enr()
569569
}
570570
#[allow(unused)]
571571
#[inline(always)]
572572
fn rstr(rcc: &RccRB) -> &rcc::AHB3RSTR {
573-
&rcc.ahb3rstr()
573+
rcc.ahb3rstr()
574574
}
575575
#[allow(unused)]
576576
#[inline(always)]
577577
fn smenr(rcc: &RccRB) -> &rcc::AHB3SMENR {
578-
&rcc.ahb3smenr()
578+
rcc.ahb3smenr()
579579
}
580580
}
581581

@@ -585,16 +585,16 @@ pub struct APB1_1 {
585585
impl APB1_1 {
586586
#[inline(always)]
587587
fn enr(rcc: &RccRB) -> &rcc::APB1ENR1 {
588-
&rcc.apb1enr1()
588+
rcc.apb1enr1()
589589
}
590590
#[inline(always)]
591591
fn rstr(rcc: &RccRB) -> &rcc::APB1RSTR1 {
592-
&rcc.apb1rstr1()
592+
rcc.apb1rstr1()
593593
}
594594
#[allow(unused)]
595595
#[inline(always)]
596596
fn smenr(rcc: &RccRB) -> &rcc::APB1SMENR1 {
597-
&rcc.apb1smenr1()
597+
rcc.apb1smenr1()
598598
}
599599
}
600600

@@ -604,16 +604,16 @@ pub struct APB1_2 {
604604
impl APB1_2 {
605605
#[inline(always)]
606606
fn enr(rcc: &RccRB) -> &rcc::APB1ENR2 {
607-
&rcc.apb1enr2()
607+
rcc.apb1enr2()
608608
}
609609
#[inline(always)]
610610
fn rstr(rcc: &RccRB) -> &rcc::APB1RSTR2 {
611-
&rcc.apb1rstr2()
611+
rcc.apb1rstr2()
612612
}
613613
#[allow(unused)]
614614
#[inline(always)]
615615
fn smenr(rcc: &RccRB) -> &rcc::APB1SMENR2 {
616-
&rcc.apb1smenr2()
616+
rcc.apb1smenr2()
617617
}
618618
}
619619

@@ -623,16 +623,16 @@ pub struct APB2 {
623623
impl APB2 {
624624
#[inline(always)]
625625
fn enr(rcc: &RccRB) -> &rcc::APB2ENR {
626-
&rcc.apb2enr()
626+
rcc.apb2enr()
627627
}
628628
#[inline(always)]
629629
fn rstr(rcc: &RccRB) -> &rcc::APB2RSTR {
630-
&rcc.apb2rstr()
630+
rcc.apb2rstr()
631631
}
632632
#[allow(unused)]
633633
#[inline(always)]
634634
fn smenr(rcc: &RccRB) -> &rcc::APB2SMENR {
635-
&rcc.apb2smenr()
635+
rcc.apb2smenr()
636636
}
637637
}
638638

0 commit comments

Comments
 (0)