I am using winit crate in Rust to create a new window. My program initially creates a CLI, and the GUI window is created based on an optional input from the user in CLI. How do I close the newly created window without exiting the process and closing the program completely.
The documentation and examples I have seen all use ControlFlow::Exit to handle the CloseRequested event, but that exits from the entire program; I only want to close the window that was created and continue running the rest of the code in the CLI. If there is an OS-specific command, I am targeting the windows OS.