Fix doc examples to use an exit code

This commit is contained in:
MultisampledNight
2021-12-15 21:31:28 +01:00
parent 0df486896b
commit daabcdf9ef
2 changed files with 4 additions and 2 deletions

View File

@@ -67,7 +67,9 @@
//! ..
//! } => {
//! println!("The close button was pressed; stopping");
//! *control_flow = ControlFlow::Exit
//! // The number contained by the exit variant determines which exit code the
//! // application will have where that's sensible.
//! *control_flow = ControlFlow::Exit(0);
//! },
//! Event::MainEventsCleared => {
//! // Application update code.

View File

@@ -32,7 +32,7 @@ pub use crate::icon::{BadIcon, Icon};
/// Event::WindowEvent {
/// event: WindowEvent::CloseRequested,
/// ..
/// } => *control_flow = ControlFlow::Exit,
/// } => *control_flow = ControlFlow::Exit(0),
/// _ => (),
/// }
/// });