Skip to content

Commit 18afce4

Browse files
committed
Fix SDL2 Builder::dims() to take a Dims
1 parent c9b1a3d commit 18afce4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

front/src/sdl2.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub struct Window<PF> {
5555

5656
/// Builder for creating `Window`s.
5757
pub struct Builder<'title, PF> {
58-
pub dims: (u32, u32),
58+
pub dims: Dims,
5959
pub title: &'title str,
6060
pub vsync: bool,
6161
pub hidpi: bool,
@@ -74,8 +74,8 @@ pub struct Framebuf<'a, PF: PixelFmt> {
7474

7575
impl<'t, PF: PixelFmt> Builder<'t, PF> {
7676
/// Sets the width and height of the window, in pixels.
77-
pub fn dims(mut self, w: u32, h: u32) -> Self {
78-
self.dims = (w, h);
77+
pub fn dims(mut self, dims: Dims) -> Self {
78+
self.dims = dims;
7979
self
8080
}
8181
/// Sets the title of the window.

0 commit comments

Comments
 (0)