mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Use shorthand struct initialization syntax (#482)
This commit is contained in:
committed by
Philipp Oppermann
parent
0aa59f3ab8
commit
cd44531822
@@ -176,7 +176,7 @@ impl Writer {
|
|||||||
let color_code = self.color_code;
|
let color_code = self.color_code;
|
||||||
self.buffer.chars[row][col] = ScreenChar {
|
self.buffer.chars[row][col] = ScreenChar {
|
||||||
ascii_character: byte,
|
ascii_character: byte,
|
||||||
color_code: color_code,
|
color_code,
|
||||||
};
|
};
|
||||||
self.column_position += 1;
|
self.column_position += 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ impl Writer {
|
|||||||
let color_code = self.color_code;
|
let color_code = self.color_code;
|
||||||
self.buffer.chars[row][col].write(ScreenChar {
|
self.buffer.chars[row][col].write(ScreenChar {
|
||||||
ascii_character: byte,
|
ascii_character: byte,
|
||||||
color_code: color_code,
|
color_code,
|
||||||
});
|
});
|
||||||
self.column_position += 1;
|
self.column_position += 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user