mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 05:40:04 -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");
|
//! 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 => {
|
//! Event::MainEventsCleared => {
|
||||||
//! // Application update code.
|
//! // Application update code.
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ pub use crate::icon::{BadIcon, Icon};
|
|||||||
/// Event::WindowEvent {
|
/// Event::WindowEvent {
|
||||||
/// event: WindowEvent::CloseRequested,
|
/// event: WindowEvent::CloseRequested,
|
||||||
/// ..
|
/// ..
|
||||||
/// } => *control_flow = ControlFlow::Exit,
|
/// } => *control_flow = ControlFlow::Exit(0),
|
||||||
/// _ => (),
|
/// _ => (),
|
||||||
/// }
|
/// }
|
||||||
/// });
|
/// });
|
||||||
|
|||||||
Reference in New Issue
Block a user