Make constructors const
This commit is contained in:
parent
6547019382
commit
19d41fd146
|
@ -90,8 +90,8 @@ impl GraphicsWriter<u8> for Graphics320x200x256 {
|
||||||
|
|
||||||
impl Graphics320x200x256 {
|
impl Graphics320x200x256 {
|
||||||
/// Creates a new `Graphics320x200x256`.
|
/// Creates a new `Graphics320x200x256`.
|
||||||
pub fn new() -> Graphics320x200x256 {
|
pub const fn new() -> Graphics320x200x256 {
|
||||||
Graphics320x200x256 {}
|
Graphics320x200x256
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the start of the `FrameBuffer` as `*mut u8` as
|
/// Returns the start of the `FrameBuffer` as `*mut u8` as
|
||||||
|
|
|
@ -102,8 +102,8 @@ impl GraphicsWriter<Color16> for Graphics640x480x16 {
|
||||||
|
|
||||||
impl Graphics640x480x16 {
|
impl Graphics640x480x16 {
|
||||||
/// Creates a new `Graphics640x480x16`.
|
/// Creates a new `Graphics640x480x16`.
|
||||||
pub fn new() -> Graphics640x480x16 {
|
pub const fn new() -> Graphics640x480x16 {
|
||||||
Graphics640x480x16 {}
|
Graphics640x480x16
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_write_mode_0(&self, color: Color16) {
|
fn set_write_mode_0(&self, color: Color16) {
|
||||||
|
|
|
@ -51,7 +51,7 @@ impl TextWriter for Text40x25 {
|
||||||
|
|
||||||
impl Text40x25 {
|
impl Text40x25 {
|
||||||
/// Creates a new `Text40x25`.
|
/// Creates a new `Text40x25`.
|
||||||
pub fn new() -> Text40x25 {
|
pub const fn new() -> Text40x25 {
|
||||||
Text40x25 {}
|
Text40x25
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ impl TextWriter for Text40x50 {
|
||||||
|
|
||||||
impl Text40x50 {
|
impl Text40x50 {
|
||||||
/// Creates a new `Text40x50`.
|
/// Creates a new `Text40x50`.
|
||||||
pub fn new() -> Text40x50 {
|
pub const fn new() -> Text40x50 {
|
||||||
Text40x50 {}
|
Text40x50
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ impl TextWriter for Text80x25 {
|
||||||
|
|
||||||
impl Text80x25 {
|
impl Text80x25 {
|
||||||
/// Creates a new `Text80x25`.
|
/// Creates a new `Text80x25`.
|
||||||
pub fn new() -> Text80x25 {
|
pub const fn new() -> Text80x25 {
|
||||||
Text80x25 {}
|
Text80x25
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue