Skip to content

Commit 2adb9f0

Browse files
committed
Fix clippy warnings
1 parent ac223dc commit 2adb9f0

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
@@ -466,16 +466,16 @@ pub struct AHB1 {
466466
impl AHB1 {
467467
#[inline(always)]
468468
fn enr(rcc: &RccRB) -> &rcc::AHB1ENR {
469-
&rcc.ahb1enr()
469+
rcc.ahb1enr()
470470
}
471471
#[inline(always)]
472472
fn rstr(rcc: &RccRB) -> &rcc::AHB1RSTR {
473-
&rcc.ahb1rstr()
473+
rcc.ahb1rstr()
474474
}
475475
#[allow(unused)]
476476
#[inline(always)]
477477
fn smenr(rcc: &RccRB) -> &rcc::AHB1SMENR {
478-
&rcc.ahb1smenr()
478+
rcc.ahb1smenr()
479479
}
480480
}
481481

@@ -485,16 +485,16 @@ pub struct AHB2 {
485485
impl AHB2 {
486486
#[inline(always)]
487487
fn enr(rcc: &RccRB) -> &rcc::AHB2ENR {
488-
&rcc.ahb2enr()
488+
rcc.ahb2enr()
489489
}
490490
#[inline(always)]
491491
fn rstr(rcc: &RccRB) -> &rcc::AHB2RSTR {
492-
&rcc.ahb2rstr()
492+
rcc.ahb2rstr()
493493
}
494494
#[allow(unused)]
495495
#[inline(always)]
496496
fn smenr(rcc: &RccRB) -> &rcc::AHB2SMENR {
497-
&rcc.ahb2smenr()
497+
rcc.ahb2smenr()
498498
}
499499
}
500500

@@ -505,17 +505,17 @@ impl AHB3 {
505505
#[allow(unused)]
506506
#[inline(always)]
507507
fn enr(rcc: &RccRB) -> &rcc::AHB3ENR {
508-
&rcc.ahb3enr()
508+
rcc.ahb3enr()
509509
}
510510
#[allow(unused)]
511511
#[inline(always)]
512512
fn rstr(rcc: &RccRB) -> &rcc::AHB3RSTR {
513-
&rcc.ahb3rstr()
513+
rcc.ahb3rstr()
514514
}
515515
#[allow(unused)]
516516
#[inline(always)]
517517
fn smenr(rcc: &RccRB) -> &rcc::AHB3SMENR {
518-
&rcc.ahb3smenr()
518+
rcc.ahb3smenr()
519519
}
520520
}
521521

@@ -525,16 +525,16 @@ pub struct APB1_1 {
525525
impl APB1_1 {
526526
#[inline(always)]
527527
fn enr(rcc: &RccRB) -> &rcc::APB1ENR1 {
528-
&rcc.apb1enr1()
528+
rcc.apb1enr1()
529529
}
530530
#[inline(always)]
531531
fn rstr(rcc: &RccRB) -> &rcc::APB1RSTR1 {
532-
&rcc.apb1rstr1()
532+
rcc.apb1rstr1()
533533
}
534534
#[allow(unused)]
535535
#[inline(always)]
536536
fn smenr(rcc: &RccRB) -> &rcc::APB1SMENR1 {
537-
&rcc.apb1smenr1()
537+
rcc.apb1smenr1()
538538
}
539539
}
540540

@@ -544,16 +544,16 @@ pub struct APB1_2 {
544544
impl APB1_2 {
545545
#[inline(always)]
546546
fn enr(rcc: &RccRB) -> &rcc::APB1ENR2 {
547-
&rcc.apb1enr2()
547+
rcc.apb1enr2()
548548
}
549549
#[inline(always)]
550550
fn rstr(rcc: &RccRB) -> &rcc::APB1RSTR2 {
551-
&rcc.apb1rstr2()
551+
rcc.apb1rstr2()
552552
}
553553
#[allow(unused)]
554554
#[inline(always)]
555555
fn smenr(rcc: &RccRB) -> &rcc::APB1SMENR2 {
556-
&rcc.apb1smenr2()
556+
rcc.apb1smenr2()
557557
}
558558
}
559559

@@ -563,16 +563,16 @@ pub struct APB2 {
563563
impl APB2 {
564564
#[inline(always)]
565565
fn enr(rcc: &RccRB) -> &rcc::APB2ENR {
566-
&rcc.apb2enr()
566+
rcc.apb2enr()
567567
}
568568
#[inline(always)]
569569
fn rstr(rcc: &RccRB) -> &rcc::APB2RSTR {
570-
&rcc.apb2rstr()
570+
rcc.apb2rstr()
571571
}
572572
#[allow(unused)]
573573
#[inline(always)]
574574
fn smenr(rcc: &RccRB) -> &rcc::APB2SMENR {
575-
&rcc.apb2smenr()
575+
rcc.apb2smenr()
576576
}
577577
}
578578

0 commit comments

Comments
 (0)