Skip to content

Commit 2f66e58

Browse files
rust-osdev#364: rustfmt
1 parent 16330cd commit 2f66e58

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

bios/stage-4/src/main.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,20 @@ pub extern "C" fn _start(info: &mut BiosInfo) -> ! {
129129
};
130130

131131
#[allow(deprecated)]
132-
if config.frame_buffer_physical.minimum_framebuffer_height.is_none() {
132+
if config
133+
.frame_buffer_physical
134+
.minimum_framebuffer_height
135+
.is_none()
136+
{
133137
config.frame_buffer_physical.minimum_framebuffer_height =
134138
kernel.config.frame_buffer.minimum_framebuffer_height;
135139
}
136140
#[allow(deprecated)]
137-
if config.frame_buffer_physical.minimum_framebuffer_width.is_none() {
141+
if config
142+
.frame_buffer_physical
143+
.minimum_framebuffer_width
144+
.is_none()
145+
{
138146
config.frame_buffer_physical.minimum_framebuffer_width =
139147
kernel.config.frame_buffer.minimum_framebuffer_width;
140148
}

uefi/src/main.rs

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,20 @@ fn main_inner(image: Handle, mut st: SystemTable<Boot>) -> Status {
9898
};
9999

100100
#[allow(deprecated)]
101-
if config.frame_buffer_physical.minimum_framebuffer_height.is_none() {
101+
if config
102+
.frame_buffer_physical
103+
.minimum_framebuffer_height
104+
.is_none()
105+
{
102106
config.frame_buffer_physical.minimum_framebuffer_height =
103107
kernel.config.frame_buffer.minimum_framebuffer_height;
104108
}
105109
#[allow(deprecated)]
106-
if config.frame_buffer_physical.minimum_framebuffer_width.is_none() {
110+
if config
111+
.frame_buffer_physical
112+
.minimum_framebuffer_width
113+
.is_none()
114+
{
107115
config.frame_buffer_physical.minimum_framebuffer_width =
108116
kernel.config.frame_buffer.minimum_framebuffer_width;
109117
}
@@ -493,8 +501,12 @@ fn init_logger(
493501
res.1 >= height && res.0 >= width
494502
})
495503
.last(),
496-
(Some(height), None) => modes.filter(|m| m.info().resolution().1 >= height).last(),
497-
(None, Some(width)) => modes.filter(|m| m.info().resolution().0 >= width).last(),
504+
(Some(height), None) => {
505+
modes.filter(|m| m.info().resolution().1 >= height).last()
506+
}
507+
(None, Some(width)) => {
508+
modes.filter(|m| m.info().resolution().0 >= width).last()
509+
}
498510
_ => None,
499511
}
500512
} else {
@@ -514,8 +526,12 @@ fn init_logger(
514526
res.1 >= height && res.0 >= width
515527
})
516528
.last(),
517-
(Some(height), None) => modes.filter(|m| m.info().resolution().1 >= height).last(),
518-
(None, Some(width)) => modes.filter(|m| m.info().resolution().0 >= width).last(),
529+
(Some(height), None) => {
530+
modes.filter(|m| m.info().resolution().1 >= height).last()
531+
}
532+
(None, Some(width)) => {
533+
modes.filter(|m| m.info().resolution().0 >= width).last()
534+
}
519535
_ => None,
520536
}
521537
}

0 commit comments

Comments
 (0)