add no_run attribute to doc comments with an infinite main loop example

This commit is contained in:
Gered 2023-02-27 14:55:50 -05:00
parent f2f7ae5dee
commit 624ca95a97

View file

@ -476,10 +476,10 @@ impl System {
/// true if a [`SystemEvent::Quit`] event is encountered, in which case, the application /// true if a [`SystemEvent::Quit`] event is encountered, in which case, the application
/// should quit. Otherwise, returns false. /// should quit. Otherwise, returns false.
/// ///
/// ``` /// ```no_run
/// use libretrogd::system::*; /// use libretrogd::system::*;
/// ///
/// let mut system = SystemBuilder::new().window_title("Example").build()?; /// let mut system = SystemBuilder::new().window_title("Example").build().unwrap();
/// ///
/// while !system.do_events() { /// while !system.do_events() {
/// // ... the body of your main loop here ... /// // ... the body of your main loop here ...
@ -490,10 +490,10 @@ impl System {
/// [`System::do_events`], you should instead manually take care of event polling in your /// [`System::do_events`], you should instead manually take care of event polling in your
/// main loop. For example: /// main loop. For example:
/// ///
/// ``` /// ```no_run
/// use libretrogd::system::*; /// use libretrogd::system::*;
/// ///
/// let mut system = SystemBuilder::new().window_title("Example").build()?; /// let mut system = SystemBuilder::new().window_title("Example").build().unwrap();
/// ///
/// 'mainloop: loop { /// 'mainloop: loop {
/// system.input_devices.update(); /// system.input_devices.update();