File tree Expand file tree Collapse file tree 5 files changed +17
-12
lines changed Expand file tree Collapse file tree 5 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 1010
1111#![ no_std]
1212#![ cfg_attr( docsrs, feature( doc_auto_cfg) ) ]
13- #![ deny( missing_debug_implementations) ]
14- #![ deny( clippy:: all) ]
15- #![ deny( clippy:: ptr_as_ptr, unused) ]
16- #![ deny( clippy:: must_use_candidate) ]
13+ #![ deny(
14+ clippy:: all,
15+ clippy:: missing_const_for_fn,
16+ clippy:: must_use_candidate,
17+ clippy:: ptr_as_ptr,
18+ clippy:: use_self,
19+ missing_debug_implementations,
20+ unused
21+ ) ]
1722
1823#[ macro_use]
1924mod enums;
Original file line number Diff line number Diff line change @@ -104,14 +104,14 @@ impl Status {
104104 #[ inline]
105105 #[ must_use]
106106 pub fn is_success ( self ) -> bool {
107- self == Status :: SUCCESS
107+ self == Self :: SUCCESS
108108 }
109109
110110 /// Returns true if status code indicates a warning.
111111 #[ inline]
112112 #[ must_use]
113113 pub fn is_warning ( self ) -> bool {
114- ( self != Status :: SUCCESS ) && ( self . 0 & Self :: ERROR_BIT == 0 )
114+ ( self != Self :: SUCCESS ) && ( self . 0 & Self :: ERROR_BIT == 0 )
115115 }
116116
117117 /// Returns true if the status code indicates an error.
Original file line number Diff line number Diff line change @@ -367,8 +367,8 @@ impl MemoryDescriptor {
367367}
368368
369369impl Default for MemoryDescriptor {
370- fn default ( ) -> MemoryDescriptor {
371- MemoryDescriptor {
370+ fn default ( ) -> Self {
371+ Self {
372372 ty : MemoryType :: RESERVED ,
373373 phys_start : 0 ,
374374 virt_start : 0 ,
@@ -439,9 +439,9 @@ impl MemoryType {
439439 /// Construct a custom `MemoryType`. Values in the range `0x8000_0000..=0xffff_ffff` are free for use if you are
440440 /// an OS loader.
441441 #[ must_use]
442- pub const fn custom ( value : u32 ) -> MemoryType {
442+ pub const fn custom ( value : u32 ) -> Self {
443443 assert ! ( value >= 0x80000000 ) ;
444- MemoryType ( value)
444+ Self ( value)
445445 }
446446}
447447
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ impl Revision {
6161 let major = major as u32 ;
6262 let minor = minor as u32 ;
6363 let value = ( major << 16 ) | minor;
64- Revision ( value)
64+ Self ( value)
6565 }
6666
6767 /// Returns the major revision.
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ impl Display for Time {
111111
112112/// The padding fields of `Time` are ignored for comparison.
113113impl PartialEq for Time {
114- fn eq ( & self , other : & Time ) -> bool {
114+ fn eq ( & self , other : & Self ) -> bool {
115115 self . year == other. year
116116 && self . month == other. month
117117 && self . day == other. day
You can’t perform that action at this time.
0 commit comments