diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d2c99c5183..fa42f9a047 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,7 +2,7 @@ name: Lint on: [push, pull_request] jobs: all: - runs-on: macOS-latest + runs-on: ubuntu-latest steps: - uses: hecrj/setup-rust-action@v1 with: @@ -17,4 +17,4 @@ jobs: - name: Check lints run: | cargo clippy --no-default-features --features "winit" --all-targets - cargo clippy --no-default-features --features "wayland wgpu svg canvas qr_code lazy debug tokio palette web-colors system a11y" + cargo clippy --no-default-features --features "wayland wgpu svg canvas qr_code lazy debug tokio palette web-colors a11y" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b1183e596a..db548fa31d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: sudo apt-get install -y libxkbcommon-dev libwayland-dev - name: Run tests run: | - cargo test --verbose --features "winit wgpu svg canvas qr_code lazy debug tokio palette web-colors system a11y" + cargo test --verbose --features "winit wgpu svg canvas qr_code lazy debug tokio palette web-colors a11y" cargo test -p iced_accessibility cargo test -p iced_core cargo test -p iced_futures @@ -35,7 +35,7 @@ jobs: - name: test wayland if: matrix.os == 'ubuntu-latest' run: | - cargo test --verbose --features "wayland wgpu svg canvas qr_code lazy debug tokio palette web-colors system a11y" + cargo test --verbose --features "wayland wgpu svg canvas qr_code lazy debug tokio palette web-colors a11y" cargo test -p iced_sctk web: diff --git a/core/src/overlay.rs b/core/src/overlay.rs index 347e4c383c..9ee0d4bb9f 100644 --- a/core/src/overlay.rs +++ b/core/src/overlay.rs @@ -41,7 +41,7 @@ where cursor: mouse::Cursor, ); - /// Applies a [`widget::Operation`] to the [`Overlay`]. + /// Applies an [`Operation`] to the [`Overlay`]. fn operate( &mut self, _layout: Layout<'_>, diff --git a/src/application.rs b/src/application.rs index e0054e203d..83e2e77fdd 100644 --- a/src/application.rs +++ b/src/application.rs @@ -25,8 +25,6 @@ pub use crate::style::application::{Appearance, StyleSheet}; /// # Examples /// [The repository has a bunch of examples] that use the [`Application`] trait: /// -/// - [`clock`], an application that uses the [`Canvas`] widget to draw a clock -/// and its hands to display the current time. /// - [`download_progress`], a basic application that asynchronously downloads /// a dummy file of 100 MB and tracks the download progress. /// - [`events`], a log of native events displayed using a conditional @@ -35,8 +33,6 @@ pub use crate::style::application::{Appearance, StyleSheet}; /// by [John Horton Conway]. /// - [`pokedex`], an application that displays a random Pokédex entry (sprite /// included!) by using the [PokéAPI]. -/// - [`solar_system`], an animated solar system drawn using the [`Canvas`] widget -/// and showcasing how to compose different transforms. /// - [`stopwatch`], a watch with start/stop and reset buttons showcasing how /// to listen to time. /// - [`todos`], a todos tracker inspired by [TodoMVC]. @@ -51,7 +47,6 @@ pub use crate::style::application::{Appearance, StyleSheet}; /// [`stopwatch`]: https://github.com/iced-rs/iced/tree/0.10/examples/stopwatch /// [`todos`]: https://github.com/iced-rs/iced/tree/0.10/examples/todos /// [`Sandbox`]: crate::Sandbox -/// [`Canvas`]: crate::widget::Canvas /// [PokéAPI]: https://pokeapi.co/ /// [TodoMVC]: http://todomvc.com/ /// diff --git a/src/lib.rs b/src/lib.rs index c2a89141c1..2422c780de 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -143,7 +143,7 @@ //! 1. Draw the resulting user interface. //! //! # Usage -//! The [`Application`] and [`Sandbox`] traits should get you started quickly, +//! The [`Application`] trait should get you started quickly, //! streamlining all the process described above! //! //! [Elm]: https://elm-lang.org/ @@ -335,7 +335,5 @@ pub type Renderer = renderer::Renderer; pub type Element<'a, Message, Renderer = crate::Renderer> = crate::core::Element<'a, Message, Renderer>; -/// The result of running an [`Application`]. -/// -/// [`Application`]: crate::Application +/// The result of running an application. pub type Result = std::result::Result<(), Error>; diff --git a/src/sandbox.rs b/src/sandbox.rs index 825a0b60e2..65a48519e2 100644 --- a/src/sandbox.rs +++ b/src/sandbox.rs @@ -44,10 +44,8 @@ use crate::{Application, Command, Element, Error, Settings, Subscription}; /// [`styling`]: https://github.com/iced-rs/iced/tree/0.10/examples/styling /// [`svg`]: https://github.com/iced-rs/iced/tree/0.10/examples/svg /// [`tour`]: https://github.com/iced-rs/iced/tree/0.10/examples/tour -/// [`Canvas widget`]: crate::widget::Canvas /// [the overview]: index.html#overview /// [`iced_wgpu`]: https://github.com/iced-rs/iced/tree/0.10/wgpu -/// [`Svg` widget]: crate::widget::Svg /// [Ghostscript Tiger]: https://commons.wikimedia.org/wiki/File:Ghostscript_Tiger.svg /// /// ## A simple "Hello, world!" diff --git a/src/settings.rs b/src/settings.rs index bb618561e4..aa98e1a9ca 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -27,9 +27,7 @@ pub struct Settings { #[cfg(feature = "wayland")] pub initial_surface: InitialSurface, - /// The data needed to initialize the [`Application`]. - /// - /// [`Application`]: crate::Application + /// The data needed to initialize the Application. pub flags: Flags, /// The fonts to load on boot. @@ -48,12 +46,9 @@ pub struct Settings { /// If set to true, the renderer will try to perform antialiasing for some /// primitives. /// - /// Enabling it can produce a smoother result in some widgets, like the - /// [`Canvas`], at a performance cost. + /// Enabling it can produce a smoother result in some widgets /// /// By default, it is disabled. - /// - /// [`Canvas`]: crate::widget::Canvas pub antialiasing: bool, /// Whether the [`Application`] should exit when the user requests the @@ -67,9 +62,7 @@ pub struct Settings { #[cfg(not(any(feature = "winit", feature = "wayland")))] impl Settings { - /// Initialize [`Application`] settings using the given data. - /// - /// [`Application`]: crate::Application + /// Initialize Application settings using the given data. pub fn with_flags(flags: Flags) -> Self { let default_settings = Settings::<()>::default(); Self { diff --git a/src/wayland/mod.rs b/src/wayland/mod.rs index a3e58b999f..b768f49648 100644 --- a/src/wayland/mod.rs +++ b/src/wayland/mod.rs @@ -12,9 +12,6 @@ pub use iced_sctk::{application::SurfaceIdWrapper, commands::*, settings::*}; /// /// Unlike the impure version, the `view` method of this trait takes an /// immutable reference to `self` and returns a pure [`Element`]. -/// -/// [`Application`]: crate::Application -/// [`Element`]: pure::Element pub trait Application: Sized { /// The [`Executor`] that will run commands and subscriptions. /// @@ -60,17 +57,12 @@ pub trait Application: Sized { /// Any [`Command`] returned will be executed immediately in the background. fn update(&mut self, message: Self::Message) -> Command; - /// Returns the current [`Theme`] of the [`Application`]. - /// - /// [`Theme`]: Self::Theme + /// Returns the current Theme of the [`Application`]. fn theme(&self) -> Self::Theme { Self::Theme::default() } - /// Returns the current [`Style`] of the [`Theme`]. - /// - /// [`Style`]: ::Style - /// [`Theme`]: Self::Theme + /// Returns the current Style of the Theme. fn style(&self) -> ::Style { ::Style::default() } diff --git a/src/wayland/sandbox.rs b/src/wayland/sandbox.rs index eb6c7397c8..db101e1003 100644 --- a/src/wayland/sandbox.rs +++ b/src/wayland/sandbox.rs @@ -33,8 +33,6 @@ use crate::{ /// slider. /// - [`styling`], an example showcasing custom styling with a light and dark /// theme. -/// - [`svg`], an application that renders the [Ghostscript Tiger] by leveraging -/// the [`Svg` widget]. /// - [`tour`], a simple UI tour that can run both on native platforms and the /// web! /// @@ -46,12 +44,9 @@ use crate::{ /// [`pane_grid`]: https://github.com/iced-rs/iced/tree/0.4/examples/pane_grid /// [`progress_bar`]: https://github.com/iced-rs/iced/tree/0.4/examples/progress_bar /// [`styling`]: https://github.com/iced-rs/iced/tree/0.4/examples/styling -/// [`svg`]: https://github.com/iced-rs/iced/tree/0.4/examples/svg /// [`tour`]: https://github.com/iced-rs/iced/tree/0.4/examples/tour -/// [`Canvas widget`]: crate::widget::Canvas /// [the overview]: index.html#overview /// [`iced_wgpu`]: https://github.com/iced-rs/iced/tree/0.4/wgpu -/// [`Svg` widget]: crate::widget::Svg /// [Ghostscript Tiger]: https://commons.wikimedia.org/wiki/File:Ghostscript_Tiger.svg /// /// ## A simple "Hello, world!"