mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
Fix doc examples to use an exit code
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -32,7 +32,7 @@ pub use crate::icon::{BadIcon, Icon};
|
||||
/// Event::WindowEvent {
|
||||
/// event: WindowEvent::CloseRequested,
|
||||
/// ..
|
||||
/// } => *control_flow = ControlFlow::Exit,
|
||||
/// } => *control_flow = ControlFlow::Exit(0),
|
||||
/// _ => (),
|
||||
/// }
|
||||
/// });
|
||||
|
||||
Reference in New Issue
Block a user