From 624ca95a97d140c7e09dad047e28ba0a28cad9a8 Mon Sep 17 00:00:00 2001 From: gered Date: Mon, 27 Feb 2023 14:55:50 -0500 Subject: [PATCH] add no_run attribute to doc comments with an infinite main loop example --- libretrogd/src/system/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libretrogd/src/system/mod.rs b/libretrogd/src/system/mod.rs index 552cb3a..50b9632 100644 --- a/libretrogd/src/system/mod.rs +++ b/libretrogd/src/system/mod.rs @@ -476,10 +476,10 @@ impl System { /// true if a [`SystemEvent::Quit`] event is encountered, in which case, the application /// should quit. Otherwise, returns false. /// - /// ``` + /// ```no_run /// 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() { /// // ... 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 /// main loop. For example: /// - /// ``` + /// ```no_run /// use libretrogd::system::*; /// - /// let mut system = SystemBuilder::new().window_title("Example").build()?; + /// let mut system = SystemBuilder::new().window_title("Example").build().unwrap(); /// /// 'mainloop: loop { /// system.input_devices.update();