From 7e1ef7d150aa3d4d05942eea2706348f20d61d64 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 17 Mar 2024 13:57:53 +0100 Subject: Fix new doc test in root module --- src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 1f2b8c93..c2177484 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -137,6 +137,13 @@ //! And that's everything! We just wrote a whole user interface. Let's run it: //! //! ```no_run +//! # #[derive(Default)] +//! # struct Counter; +//! # impl Counter { +//! # fn update(&mut self, _message: ()) {} +//! # fn view(&self) -> iced::Element<()> { unimplemented!() } +//! # } +//! # //! fn main() -> iced::Result { //! iced::run("A cool counter", Counter::update, Counter::view) //! } -- cgit