Skip to content

Commit 323d46c

Browse files
authored
Merge pull request #502 from rust-osdev/fix-clippy-warnings
Fix clippy warnings
2 parents 8adb26d + 1829dc1 commit 323d46c

File tree

4 files changed

+20
-17
lines changed

4 files changed

+20
-17
lines changed

src/instructions/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ pub fn nop() {
3232
}
3333
}
3434

35-
/// Emits a '[magic breakpoint](https://wiki.osdev.org/Bochs#Magic_Breakpoint)' instruction for the [Bochs](http://bochs.sourceforge.net/) CPU
36-
/// emulator. Make sure to set `magic_break: enabled=1` in your `.bochsrc` file.
35+
/// Emits a '[magic breakpoint](https://wiki.osdev.org/Bochs#Magic_Breakpoint)'
36+
/// instruction for the [Bochs](http://bochs.sourceforge.net/) CPU
37+
/// emulator.
38+
///
39+
/// Make sure to set `magic_break: enabled=1` in your `.bochsrc` file.
3740
#[inline]
3841
pub fn bochs_breakpoint() {
3942
unsafe {

src/structures/paging/mapper/mapped_page_table.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
150150
}
151151
}
152152

153-
impl<'a, P: PageTableFrameMapping> Mapper<Size1GiB> for MappedPageTable<'a, P> {
153+
impl<P: PageTableFrameMapping> Mapper<Size1GiB> for MappedPageTable<'_, P> {
154154
#[inline]
155155
unsafe fn map_to_with_table_flags<A>(
156156
&mut self,
@@ -258,7 +258,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size1GiB> for MappedPageTable<'a, P> {
258258
}
259259
}
260260

261-
impl<'a, P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'a, P> {
261+
impl<P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'_, P> {
262262
#[inline]
263263
unsafe fn map_to_with_table_flags<A>(
264264
&mut self,
@@ -386,7 +386,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'a, P> {
386386
}
387387
}
388388

389-
impl<'a, P: PageTableFrameMapping> Mapper<Size4KiB> for MappedPageTable<'a, P> {
389+
impl<P: PageTableFrameMapping> Mapper<Size4KiB> for MappedPageTable<'_, P> {
390390
#[inline]
391391
unsafe fn map_to_with_table_flags<A>(
392392
&mut self,
@@ -530,7 +530,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size4KiB> for MappedPageTable<'a, P> {
530530
}
531531
}
532532

533-
impl<'a, P: PageTableFrameMapping> Translate for MappedPageTable<'a, P> {
533+
impl<P: PageTableFrameMapping> Translate for MappedPageTable<'_, P> {
534534
#[allow(clippy::inconsistent_digit_grouping)]
535535
fn translate(&self, addr: VirtAddr) -> TranslateResult {
536536
let p4 = &self.level_4_table;
@@ -594,7 +594,7 @@ impl<'a, P: PageTableFrameMapping> Translate for MappedPageTable<'a, P> {
594594
}
595595
}
596596

597-
impl<'a, P: PageTableFrameMapping> CleanUp for MappedPageTable<'a, P> {
597+
impl<P: PageTableFrameMapping> CleanUp for MappedPageTable<'_, P> {
598598
#[inline]
599599
unsafe fn clean_up<D>(&mut self, frame_deallocator: &mut D)
600600
where

src/structures/paging/mapper/offset_page_table.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ unsafe impl PageTableFrameMapping for PhysOffset {
6565

6666
// delegate all trait implementations to inner
6767

68-
impl<'a> Mapper<Size1GiB> for OffsetPageTable<'a> {
68+
impl Mapper<Size1GiB> for OffsetPageTable<'_> {
6969
#[inline]
7070
unsafe fn map_to_with_table_flags<A>(
7171
&mut self,
@@ -134,7 +134,7 @@ impl<'a> Mapper<Size1GiB> for OffsetPageTable<'a> {
134134
}
135135
}
136136

137-
impl<'a> Mapper<Size2MiB> for OffsetPageTable<'a> {
137+
impl Mapper<Size2MiB> for OffsetPageTable<'_> {
138138
#[inline]
139139
unsafe fn map_to_with_table_flags<A>(
140140
&mut self,
@@ -203,7 +203,7 @@ impl<'a> Mapper<Size2MiB> for OffsetPageTable<'a> {
203203
}
204204
}
205205

206-
impl<'a> Mapper<Size4KiB> for OffsetPageTable<'a> {
206+
impl Mapper<Size4KiB> for OffsetPageTable<'_> {
207207
#[inline]
208208
unsafe fn map_to_with_table_flags<A>(
209209
&mut self,
@@ -272,14 +272,14 @@ impl<'a> Mapper<Size4KiB> for OffsetPageTable<'a> {
272272
}
273273
}
274274

275-
impl<'a> Translate for OffsetPageTable<'a> {
275+
impl Translate for OffsetPageTable<'_> {
276276
#[inline]
277277
fn translate(&self, addr: VirtAddr) -> TranslateResult {
278278
self.inner.translate(addr)
279279
}
280280
}
281281

282-
impl<'a> CleanUp for OffsetPageTable<'a> {
282+
impl CleanUp for OffsetPageTable<'_> {
283283
#[inline]
284284
unsafe fn clean_up<D>(&mut self, frame_deallocator: &mut D)
285285
where

src/structures/paging/mapper/recursive_page_table.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ impl<'a> RecursivePageTable<'a> {
299299
}
300300
}
301301

302-
impl<'a> Mapper<Size1GiB> for RecursivePageTable<'a> {
302+
impl Mapper<Size1GiB> for RecursivePageTable<'_> {
303303
#[inline]
304304
unsafe fn map_to_with_table_flags<A>(
305305
&mut self,
@@ -419,7 +419,7 @@ impl<'a> Mapper<Size1GiB> for RecursivePageTable<'a> {
419419
}
420420
}
421421

422-
impl<'a> Mapper<Size2MiB> for RecursivePageTable<'a> {
422+
impl Mapper<Size2MiB> for RecursivePageTable<'_> {
423423
#[inline]
424424
unsafe fn map_to_with_table_flags<A>(
425425
&mut self,
@@ -574,7 +574,7 @@ impl<'a> Mapper<Size2MiB> for RecursivePageTable<'a> {
574574
}
575575
}
576576

577-
impl<'a> Mapper<Size4KiB> for RecursivePageTable<'a> {
577+
impl Mapper<Size4KiB> for RecursivePageTable<'_> {
578578
#[inline]
579579
unsafe fn map_to_with_table_flags<A>(
580580
&mut self,
@@ -763,7 +763,7 @@ impl<'a> Mapper<Size4KiB> for RecursivePageTable<'a> {
763763
}
764764
}
765765

766-
impl<'a> Translate for RecursivePageTable<'a> {
766+
impl Translate for RecursivePageTable<'_> {
767767
#[allow(clippy::inconsistent_digit_grouping)]
768768
fn translate(&self, addr: VirtAddr) -> TranslateResult {
769769
let page = Page::containing_address(addr);
@@ -836,7 +836,7 @@ impl<'a> Translate for RecursivePageTable<'a> {
836836
}
837837
}
838838

839-
impl<'a> CleanUp for RecursivePageTable<'a> {
839+
impl CleanUp for RecursivePageTable<'_> {
840840
#[inline]
841841
unsafe fn clean_up<D>(&mut self, frame_deallocator: &mut D)
842842
where

0 commit comments

Comments
 (0)