Skip to content

Commit

Permalink
style: update rustfmt on nightly-2022-11-03 (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Nov 16, 2022
1 parent 56ec135 commit 7a3a2b5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 10 deletions.
7 changes: 6 additions & 1 deletion hal-x86_64/src/vga.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,12 @@ impl fmt::Write for Buffer {

impl fmt::Debug for Buffer {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let Self { row, col, color, buf: _} = self;
let Self {
row,
col,
color,
buf: _,
} = self;
f.debug_struct("vga::Buffer")
.field("row", row)
.field("col", col)
Expand Down
3 changes: 1 addition & 2 deletions maitake/src/sync/wait_map/tests/loom.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use super::*;
use crate::loom::{self, future, sync::Arc, thread};

Expand Down Expand Up @@ -90,4 +89,4 @@ fn wake_and_drop() {

thread.join().unwrap();
});
}
}
6 changes: 5 additions & 1 deletion maitake/src/time/timer/sleep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ impl PinnedDrop for Sleep<'_> {

impl fmt::Debug for Sleep<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let Self { state, entry, timer } = self;
let Self {
state,
entry,
timer,
} = self;
f.debug_struct("Sleep")
.field("duration", &self.duration())
.field("state", state)
Expand Down
9 changes: 8 additions & 1 deletion maitake/src/time/timer/wheel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,14 @@ impl Wheel {

impl fmt::Debug for Wheel {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let Self { level, ticks_per_slot, ticks_per_wheel, wheel_mask, occupied_slots, slots: _ } = self;
let Self {
level,
ticks_per_slot,
ticks_per_wheel,
wheel_mask,
occupied_slots,
slots: _,
} = self;
f.debug_struct("Wheel")
.field("level", level)
.field("ticks_per_slot", ticks_per_slot)
Expand Down
12 changes: 7 additions & 5 deletions mycotest/src/assert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,12 @@ macro_rules! assert_binop {

impl core::fmt::Debug for Failed {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let Self { expr, file, line, col } = self;
write!(
f,
"assertion failed: `{expr}`, {file}:{line}:{col}",
)
let Self {
expr,
file,
line,
col,
} = self;
write!(f, "assertion failed: `{expr}`, {file}:{line}:{col}",)
}
}

0 comments on commit 7a3a2b5

Please sign in to comment.