Skip to content

Commit 48db23b

Browse files
committed
Fix clippy warnings
1 parent f5bedb3 commit 48db23b

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
@@ -531,16 +531,16 @@ pub struct AHB1 {
531531
impl AHB1 {
532532
#[inline(always)]
533533
fn enr(rcc: &RccRB) -> &rcc::AHB1ENR {
534-
&rcc.ahb1enr()
534+
rcc.ahb1enr()
535535
}
536536
#[inline(always)]
537537
fn rstr(rcc: &RccRB) -> &rcc::AHB1RSTR {
538-
&rcc.ahb1rstr()
538+
rcc.ahb1rstr()
539539
}
540540
#[allow(unused)]
541541
#[inline(always)]
542542
fn smenr(rcc: &RccRB) -> &rcc::AHB1SMENR {
543-
&rcc.ahb1smenr()
543+
rcc.ahb1smenr()
544544
}
545545
}
546546

@@ -550,16 +550,16 @@ pub struct AHB2 {
550550
impl AHB2 {
551551
#[inline(always)]
552552
fn enr(rcc: &RccRB) -> &rcc::AHB2ENR {
553-
&rcc.ahb2enr()
553+
rcc.ahb2enr()
554554
}
555555
#[inline(always)]
556556
fn rstr(rcc: &RccRB) -> &rcc::AHB2RSTR {
557-
&rcc.ahb2rstr()
557+
rcc.ahb2rstr()
558558
}
559559
#[allow(unused)]
560560
#[inline(always)]
561561
fn smenr(rcc: &RccRB) -> &rcc::AHB2SMENR {
562-
&rcc.ahb2smenr()
562+
rcc.ahb2smenr()
563563
}
564564
}
565565

@@ -570,17 +570,17 @@ impl AHB3 {
570570
#[allow(unused)]
571571
#[inline(always)]
572572
fn enr(rcc: &RccRB) -> &rcc::AHB3ENR {
573-
&rcc.ahb3enr()
573+
rcc.ahb3enr()
574574
}
575575
#[allow(unused)]
576576
#[inline(always)]
577577
fn rstr(rcc: &RccRB) -> &rcc::AHB3RSTR {
578-
&rcc.ahb3rstr()
578+
rcc.ahb3rstr()
579579
}
580580
#[allow(unused)]
581581
#[inline(always)]
582582
fn smenr(rcc: &RccRB) -> &rcc::AHB3SMENR {
583-
&rcc.ahb3smenr()
583+
rcc.ahb3smenr()
584584
}
585585
}
586586

@@ -590,16 +590,16 @@ pub struct APB1_1 {
590590
impl APB1_1 {
591591
#[inline(always)]
592592
fn enr(rcc: &RccRB) -> &rcc::APB1ENR1 {
593-
&rcc.apb1enr1()
593+
rcc.apb1enr1()
594594
}
595595
#[inline(always)]
596596
fn rstr(rcc: &RccRB) -> &rcc::APB1RSTR1 {
597-
&rcc.apb1rstr1()
597+
rcc.apb1rstr1()
598598
}
599599
#[allow(unused)]
600600
#[inline(always)]
601601
fn smenr(rcc: &RccRB) -> &rcc::APB1SMENR1 {
602-
&rcc.apb1smenr1()
602+
rcc.apb1smenr1()
603603
}
604604
}
605605

@@ -609,16 +609,16 @@ pub struct APB1_2 {
609609
impl APB1_2 {
610610
#[inline(always)]
611611
fn enr(rcc: &RccRB) -> &rcc::APB1ENR2 {
612-
&rcc.apb1enr2()
612+
rcc.apb1enr2()
613613
}
614614
#[inline(always)]
615615
fn rstr(rcc: &RccRB) -> &rcc::APB1RSTR2 {
616-
&rcc.apb1rstr2()
616+
rcc.apb1rstr2()
617617
}
618618
#[allow(unused)]
619619
#[inline(always)]
620620
fn smenr(rcc: &RccRB) -> &rcc::APB1SMENR2 {
621-
&rcc.apb1smenr2()
621+
rcc.apb1smenr2()
622622
}
623623
}
624624

@@ -628,16 +628,16 @@ pub struct APB2 {
628628
impl APB2 {
629629
#[inline(always)]
630630
fn enr(rcc: &RccRB) -> &rcc::APB2ENR {
631-
&rcc.apb2enr()
631+
rcc.apb2enr()
632632
}
633633
#[inline(always)]
634634
fn rstr(rcc: &RccRB) -> &rcc::APB2RSTR {
635-
&rcc.apb2rstr()
635+
rcc.apb2rstr()
636636
}
637637
#[allow(unused)]
638638
#[inline(always)]
639639
fn smenr(rcc: &RccRB) -> &rcc::APB2SMENR {
640-
&rcc.apb2smenr()
640+
rcc.apb2smenr()
641641
}
642642
}
643643

0 commit comments

Comments
 (0)