From 179e8863b3c7a1f056eef5e06fbf4f3796a641ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Sun, 17 Mar 2024 13:55:15 +0100 Subject: [PATCH] Fix broken intra-doc links to `Sandbox` --- src/application.rs | 4 +--- src/lib.rs | 16 ++++++++++++---- src/multi_window.rs | 4 +--- src/program.rs | 4 +--- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/application.rs b/src/application.rs index be0fa0ded9..48fc672a3b 100644 --- a/src/application.rs +++ b/src/application.rs @@ -15,9 +15,7 @@ pub use application::{default, Appearance, DefaultStyle}; /// document. /// /// An [`Application`] can execute asynchronous actions by returning a -/// [`Command`] in some of its methods. If you do not intend to perform any -/// background work in your program, the [`Sandbox`] trait offers a simplified -/// interface. +/// [`Command`] in some of its methods. /// /// When using an [`Application`] with the `debug` feature enabled, a debug view /// can be toggled by pressing `F12`. diff --git a/src/lib.rs b/src/lib.rs index 060cc6c5ab..1f2b8c9372 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -134,8 +134,15 @@ //! } //! ``` //! -//! And that's everything! We just wrote a whole user interface. Iced is now -//! able to: +//! And that's everything! We just wrote a whole user interface. Let's run it: +//! +//! ```no_run +//! fn main() -> iced::Result { +//! iced::run("A cool counter", Counter::update, Counter::view) +//! } +//! ``` +//! +//! Iced will automatically: //! //! 1. Take the result of our __view logic__ and layout its widgets. //! 1. Process events from our system and produce __messages__ for our @@ -143,11 +150,12 @@ //! 1. Draw the resulting user interface. //! //! # Usage -//! The [`Application`] and [`Sandbox`] traits should get you started quickly, -//! streamlining all the process described above! +//! You can either use the [`application`] builder or implement the [`Application`] +//! trait directly. //! //! [Elm]: https://elm-lang.org/ //! [The Elm Architecture]: https://guide.elm-lang.org/architecture/ +//! [`application`]: application() #![doc( html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg" )] diff --git a/src/multi_window.rs b/src/multi_window.rs index c4063563cf..fca0be4606 100644 --- a/src/multi_window.rs +++ b/src/multi_window.rs @@ -14,9 +14,7 @@ pub use crate::application::{Appearance, DefaultStyle}; /// document and display only the contents of the `window::Id::MAIN` window. /// /// An [`Application`] can execute asynchronous actions by returning a -/// [`Command`] in some of its methods. If you do not intend to perform any -/// background work in your program, the [`Sandbox`] trait offers a simplified -/// interface. +/// [`Command`] in some of its methods. /// /// When using an [`Application`] with the `debug` feature enabled, a debug view /// can be toggled by pressing `F12`. diff --git a/src/program.rs b/src/program.rs index 8aa1a4e72e..b379dccf34 100644 --- a/src/program.rs +++ b/src/program.rs @@ -5,7 +5,7 @@ //! or a specific type. //! //! This API is meant to be a more convenient—although less -//! powerful—alternative to the [`Sandbox`] and [`Application`] traits. +//! powerful—alternative to the [`Application`] traits. //! //! [`Sandbox`]: crate::Sandbox //! @@ -748,8 +748,6 @@ fn with_style( /// /// This trait is implemented both for `&static str` and /// any closure `Fn(&State) -> String`. -/// -/// You can use any of these in [`Program::title`]. pub trait Title { /// Produces the title of the [`Program`]. fn title(&self, state: &State) -> String;