match event {
Event::Quit{..} |
Event::KeyDown {keycode: Option::Some(Keycode::Escape), ..} =>
break 'mainloop,
Event::MouseButtonDown {x, y, ..} => {
canvas.fill_rect(Rect::new(x, y, 1, 1))?;
canvas.present();
}
_ => {}
}