Skip to content

Commit 8c880fd

Browse files
bors[bot]phil-opp
andcommitted
Merge #46
46: Prepare version 0.3.13 r=phil-opp a=phil-opp Co-authored-by: Philipp Oppermann <[email protected]>
2 parents 2b463ed + a9702c1 commit 8c880fd

File tree

7 files changed

+61
-37
lines changed

7 files changed

+61
-37
lines changed

Cargo.lock

+45-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cargo-features = ["publish-lockfile"]
22

33
[package]
44
name = "bootloader"
5-
version = "0.3.12"
5+
version = "0.3.13"
66
authors = ["Philipp Oppermann <[email protected]>"]
77
license = "MIT/Apache-2.0"
88
description = "An experimental pure-Rust x86 bootloader."

src/bootinfo/memory_map.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ impl MemoryMap {
2222
}
2323

2424
pub fn add_region(&mut self, region: MemoryRegion) {
25-
assert!(self.next_entry_index() < MAX_MEMORY_MAP_SIZE,
26-
"too many memory regions in memory map");
25+
assert!(
26+
self.next_entry_index() < MAX_MEMORY_MAP_SIZE,
27+
"too many memory regions in memory map"
28+
);
2729
self.entries[self.next_entry_index()] = region;
2830
self.next_entry_index += 1;
2931
self.sort();

src/main.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl IdentityMappedAddr {
6464
}
6565

6666
// Symbols defined in `linker.ld`
67-
extern {
67+
extern "C" {
6868
static mmap_ent: usize;
6969
static _memory_map: usize;
7070
static _kib_kernel_size: usize;
@@ -208,7 +208,8 @@ fn load_elf(
208208
&segments,
209209
&mut rec_page_table,
210210
&mut frame_allocator,
211-
).expect("kernel mapping failed");
211+
)
212+
.expect("kernel mapping failed");
212213

213214
// Map a page for the boot info structure
214215
let boot_info_page = {
@@ -223,7 +224,8 @@ fn load_elf(
223224
flags,
224225
&mut rec_page_table,
225226
&mut frame_allocator,
226-
).expect("Mapping of bootinfo page failed")
227+
)
228+
.expect("Mapping of bootinfo page failed")
227229
.flush();
228230
page
229231
};

src/page_table.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ pub(crate) fn map_segment(
9191
page_table_flags,
9292
page_table,
9393
frame_allocator,
94-
)?.flush();
94+
)?
95+
.flush();
9596

9697
type PageArray = [u64; Size4KiB::SIZE as usize / 8];
9798

@@ -119,7 +120,8 @@ pub(crate) fn map_segment(
119120
page_table_flags,
120121
page_table,
121122
frame_allocator,
122-
)?.flush();
123+
)?
124+
.flush();
123125
}
124126

125127
// Map additional frames.

src/printer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ pub use self::vga_text_80x25::*;
44
#[cfg(feature = "vga_320x200")]
55
pub use self::vga_320x200::*;
66

7-
mod vga_text_80x25;
87
mod vga_320x200;
8+
mod vga_text_80x25;

src/printer/vga_320x200.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl Printer {
5454
for (y, byte) in rendered.iter().enumerate() {
5555
for (x, bit) in (0..8).enumerate() {
5656
if *byte & (1 << bit) == 0 {
57-
continue
57+
continue;
5858
}
5959
let color = 0xf;
6060
vga_buffer[(y_pos + y) * SCREEN_WIDTH + x_pos + x] = color;

0 commit comments

Comments
 (0)