File tree 5 files changed +17
-12
lines changed
5 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 10
10
11
11
#![ no_std]
12
12
#![ 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
+ ) ]
17
22
18
23
#[ macro_use]
19
24
mod enums;
Original file line number Diff line number Diff line change @@ -104,14 +104,14 @@ impl Status {
104
104
#[ inline]
105
105
#[ must_use]
106
106
pub fn is_success ( self ) -> bool {
107
- self == Status :: SUCCESS
107
+ self == Self :: SUCCESS
108
108
}
109
109
110
110
/// Returns true if status code indicates a warning.
111
111
#[ inline]
112
112
#[ must_use]
113
113
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 )
115
115
}
116
116
117
117
/// 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 {
367
367
}
368
368
369
369
impl Default for MemoryDescriptor {
370
- fn default ( ) -> MemoryDescriptor {
371
- MemoryDescriptor {
370
+ fn default ( ) -> Self {
371
+ Self {
372
372
ty : MemoryType :: RESERVED ,
373
373
phys_start : 0 ,
374
374
virt_start : 0 ,
@@ -439,9 +439,9 @@ impl MemoryType {
439
439
/// Construct a custom `MemoryType`. Values in the range `0x8000_0000..=0xffff_ffff` are free for use if you are
440
440
/// an OS loader.
441
441
#[ must_use]
442
- pub const fn custom ( value : u32 ) -> MemoryType {
442
+ pub const fn custom ( value : u32 ) -> Self {
443
443
assert ! ( value >= 0x80000000 ) ;
444
- MemoryType ( value)
444
+ Self ( value)
445
445
}
446
446
}
447
447
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ impl Revision {
61
61
let major = major as u32 ;
62
62
let minor = minor as u32 ;
63
63
let value = ( major << 16 ) | minor;
64
- Revision ( value)
64
+ Self ( value)
65
65
}
66
66
67
67
/// Returns the major revision.
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ impl Display for Time {
111
111
112
112
/// The padding fields of `Time` are ignored for comparison.
113
113
impl PartialEq for Time {
114
- fn eq ( & self , other : & Time ) -> bool {
114
+ fn eq ( & self , other : & Self ) -> bool {
115
115
self . year == other. year
116
116
&& self . month == other. month
117
117
&& self . day == other. day
You can’t perform that action at this time.
0 commit comments