Skip to content

Instantly share code, notes, and snippets.

@cbeust
Created October 5, 2021 03:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbeust/0586a8e5826a611e3c94bd913db49e1f to your computer and use it in GitHub Desktop.
Save cbeust/0586a8e5826a611e3c94bd913db49e1f to your computer and use it in GitHub Desktop.
struct Window {
x: u16,
y: u16,
visible: bool,
}
impl Window {
fn new_with_visibility(x: u16, y: u16, visible: bool) -> Self {
Window {
x, y, visible
}
}
fn new(x: u16, y: u16) -> Self {
Window::new_with_visibility(x, y, false)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment