diff --git a/src/writers/graphics_320x200x256.rs b/src/writers/graphics_320x200x256.rs index 35ed689..6f55831 100644 --- a/src/writers/graphics_320x200x256.rs +++ b/src/writers/graphics_320x200x256.rs @@ -90,8 +90,8 @@ impl GraphicsWriter for Graphics320x200x256 { impl Graphics320x200x256 { /// Creates a new `Graphics320x200x256`. - pub fn new() -> Graphics320x200x256 { - Graphics320x200x256 {} + pub const fn new() -> Graphics320x200x256 { + Graphics320x200x256 } /// Returns the start of the `FrameBuffer` as `*mut u8` as diff --git a/src/writers/graphics_640x480x16.rs b/src/writers/graphics_640x480x16.rs index 6a35125..4cc8a45 100644 --- a/src/writers/graphics_640x480x16.rs +++ b/src/writers/graphics_640x480x16.rs @@ -102,8 +102,8 @@ impl GraphicsWriter for Graphics640x480x16 { impl Graphics640x480x16 { /// Creates a new `Graphics640x480x16`. - pub fn new() -> Graphics640x480x16 { - Graphics640x480x16 {} + pub const fn new() -> Graphics640x480x16 { + Graphics640x480x16 } fn set_write_mode_0(&self, color: Color16) { diff --git a/src/writers/text_40x25.rs b/src/writers/text_40x25.rs index 91e547f..6c3e758 100644 --- a/src/writers/text_40x25.rs +++ b/src/writers/text_40x25.rs @@ -51,7 +51,7 @@ impl TextWriter for Text40x25 { impl Text40x25 { /// Creates a new `Text40x25`. - pub fn new() -> Text40x25 { - Text40x25 {} + pub const fn new() -> Text40x25 { + Text40x25 } } diff --git a/src/writers/text_40x50.rs b/src/writers/text_40x50.rs index b1a8a68..e63c248 100644 --- a/src/writers/text_40x50.rs +++ b/src/writers/text_40x50.rs @@ -51,7 +51,7 @@ impl TextWriter for Text40x50 { impl Text40x50 { /// Creates a new `Text40x50`. - pub fn new() -> Text40x50 { - Text40x50 {} + pub const fn new() -> Text40x50 { + Text40x50 } } diff --git a/src/writers/text_80x25.rs b/src/writers/text_80x25.rs index 19811e2..72403d0 100644 --- a/src/writers/text_80x25.rs +++ b/src/writers/text_80x25.rs @@ -50,7 +50,7 @@ impl TextWriter for Text80x25 { impl Text80x25 { /// Creates a new `Text80x25`. - pub fn new() -> Text80x25 { - Text80x25 {} + pub const fn new() -> Text80x25 { + Text80x25 } }