diff --git a/src/lib.rs b/src/lib.rs index 9b5493021..8d5ec5661 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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. diff --git a/src/window.rs b/src/window.rs index 59c8c59f2..6992db9cf 100644 --- a/src/window.rs +++ b/src/window.rs @@ -32,7 +32,7 @@ pub use crate::icon::{BadIcon, Icon}; /// Event::WindowEvent { /// event: WindowEvent::CloseRequested, /// .. -/// } => *control_flow = ControlFlow::Exit, +/// } => *control_flow = ControlFlow::Exit(0), /// _ => (), /// } /// });