Skip to content

Commit

Permalink
cleanup git workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Nov 28, 2023
1 parent 4e1f5d9 commit 20cd3cd
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion core/src/overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<'_>,
Expand Down
5 changes: 0 additions & 5 deletions src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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].
Expand All @@ -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/
///
Expand Down
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -335,7 +335,5 @@ pub type Renderer<Theme = style::Theme> = renderer::Renderer<Theme>;
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>;
2 changes: 0 additions & 2 deletions src/sandbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down
13 changes: 3 additions & 10 deletions src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ pub struct Settings<Flags> {
#[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.
Expand All @@ -48,12 +46,9 @@ pub struct Settings<Flags> {
/// 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
Expand All @@ -67,9 +62,7 @@ pub struct Settings<Flags> {

#[cfg(not(any(feature = "winit", feature = "wayland")))]
impl<Flags> Settings<Flags> {
/// 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 {
Expand Down
12 changes: 2 additions & 10 deletions src/wayland/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -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<Self::Message>;

/// 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`]: <Self::Theme as StyleSheet>::Style
/// [`Theme`]: Self::Theme
/// Returns the current Style of the Theme.
fn style(&self) -> <Self::Theme as StyleSheet>::Style {
<Self::Theme as StyleSheet>::Style::default()
}
Expand Down
5 changes: 0 additions & 5 deletions src/wayland/sandbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!
///
Expand All @@ -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!"
Expand Down

0 comments on commit 20cd3cd

Please sign in to comment.