Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades authored and wash2 committed Nov 20, 2023
1 parent fe3de93 commit b3ede4f
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions renderer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ impl<T> crate::graphics::geometry::Renderer for Renderer<T> {
crate::Geometry::TinySkia(primitive) => {
renderer.draw_primitive(primitive);
}
#[allow(unreachable_patterns)]
_ => unreachable!(),
}
}
Expand Down
6 changes: 0 additions & 6 deletions style/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ use crate::svg;
use crate::text_input;
use crate::toggler;

use ::palette::FromColor;
use ::palette::RgbHue;
use iced_core::gradient::ColorStop;
use iced_core::gradient::Linear;
use iced_core::Degrees;
use iced_core::Radians;
use iced_core::{Background, Color, Vector};

use std::rc::Rc;
Expand Down
1 change: 1 addition & 0 deletions widget/src/checkbox.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Show toggle controls using checkboxes.
use iced_runtime::core::widget::Id;
#[cfg(feature = "a11y")]
use std::borrow::Cow;

use crate::core::alignment;
Expand Down
2 changes: 1 addition & 1 deletion widget/src/dnd_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ where
return event::Status::Captured;
}

let mut state = tree.state.downcast_mut::<State>();
let state = tree.state.downcast_mut::<State>();

if matches!(
event,
Expand Down
1 change: 1 addition & 0 deletions widget/src/scrollable.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Navigate an endless amount of content with a scrollbar.
use iced_runtime::core::widget::Id;
#[cfg(feature = "a11y")]
use std::borrow::Cow;

use crate::core::event::{self, Event};
Expand Down
1 change: 1 addition & 0 deletions widget/src/slider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use crate::core::{
Size, Widget,
};

#[cfg(feature = "a11y")]
use std::borrow::Cow;
use std::ops::RangeInclusive;

Expand Down
1 change: 1 addition & 0 deletions widget/src/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use crate::core::{
ContentFit, Element, Layout, Length, Rectangle, Size, Vector, Widget,
};

#[cfg(feature = "a11y")]
use std::borrow::Cow;
use std::path::PathBuf;

Expand Down
2 changes: 1 addition & 1 deletion widget/src/text_input/text_input_wayland.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ where
.iter()
.find(|m| mime_types.contains(&m.to_string()))
{
Some(m) => m.clone(),
Some(m) => m,
None => {
state.dnd_offer = DndOfferState::None;
return event::Status::Captured;
Expand Down
1 change: 1 addition & 0 deletions widget/src/toggler.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Show toggle controls using togglers.
#[cfg(feature = "a11y")]
use std::borrow::Cow;

use crate::core::alignment;
Expand Down
4 changes: 3 additions & 1 deletion winit/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ mod drag_resize;
mod profiler;
mod state;

#[cfg(feature = "a11y")]
use iced_graphics::core::widget::operation::focusable::focus;
use iced_graphics::core::widget::operation::OperationWrapper;
use iced_graphics::core::widget::Operation;
Expand Down Expand Up @@ -383,6 +384,7 @@ async fn run_instance<A, E, C>(
let mut events = Vec::new();
let mut messages = Vec::new();
let mut redraw_pending = false;
#[cfg(feature = "a11y")]
let mut commands: Vec<Command<A::Message>> = Vec::new();

#[cfg(feature = "a11y")]
Expand Down Expand Up @@ -1018,7 +1020,7 @@ pub fn run_command<A, C, E>(
window::Action::GainFocus => {
window.focus_window();
}
window::Action::ChangeLevel(level) => {
window::Action::ChangeLevel(_level) => {
// window.set_window_level(conversion::window_level(level));
}
window::Action::FetchId(tag) => {
Expand Down

0 comments on commit b3ede4f

Please sign in to comment.