chore: rust-toolchain.toml; cargo clippy --fix

This commit is contained in:
Ron Waldon-Howe 2024-01-12 16:49:05 +11:00 committed by Michael Murphy
parent 0ec99c4012
commit 039aeb1e74
8 changed files with 13 additions and 11 deletions

View file

@ -31,7 +31,7 @@ use crate::app;
use super::wallpaper::widgets::color_image;
pub static COLOR_PICKER_DIALOG_ID: Lazy<window::Id> = Lazy::new(|| window::Id::unique());
pub static COLOR_PICKER_DIALOG_ID: Lazy<window::Id> = Lazy::new(window::Id::unique);
enum NamedColorPicker {
CustomAccent,

View file

@ -13,7 +13,7 @@ use crate::{
},
};
pub static ADD_DOCK_APPLET_DIALOGUE_ID: Lazy<window::Id> = Lazy::new(|| window::Id::unique());
pub static ADD_DOCK_APPLET_DIALOGUE_ID: Lazy<window::Id> = Lazy::new(window::Id::unique);
pub(crate) struct Page {
inner: applets_inner::Page,

View file

@ -68,8 +68,8 @@ const SPACING: f32 = 8.0;
// radius is 8.0
const DRAG_START_DISTANCE_SQUARED: f32 = 64.0;
pub static APPLET_DND_ICON_ID: Lazy<window::Id> = Lazy::new(|| window::Id::unique());
pub static ADD_PANEL_APPLET_DIALOGUE_ID: Lazy<window::Id> = Lazy::new(|| window::Id::unique());
pub static APPLET_DND_ICON_ID: Lazy<window::Id> = Lazy::new(window::Id::unique);
pub static ADD_PANEL_APPLET_DIALOGUE_ID: Lazy<window::Id> = Lazy::new(window::Id::unique);
pub struct Page {
pub(crate) available_entries: Vec<Applet<'static>>,

View file

@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-3.0-only
use super::Message;
use cosmic::iced_core::{self, gradient::Linear, Background, BorderRadius, Color, Degrees, Length};
use cosmic::iced_core::{self, gradient::Linear, Background, Color, Degrees, Length};
use cosmic::iced_runtime::core::image::Handle as ImageHandle;
use cosmic::prelude::*;
use cosmic::widget::{button, container, space};

View file

@ -193,14 +193,14 @@ fn multi_behavior() -> Section<crate::pages::Message> {
&descriptions[0],
WorkspaceMode::Global,
Some(page.comp_workspace_config.workspace_mode),
|x| Message::SetWorkspaceMode(x),
Message::SetWorkspaceMode,
)
.into()]))
.add(settings::item_row(vec![radio(
&descriptions[1],
WorkspaceMode::OutputBound,
Some(page.comp_workspace_config.workspace_mode),
|x| Message::SetWorkspaceMode(x),
Message::SetWorkspaceMode,
)
.into()]))
.apply(Element::from)
@ -239,7 +239,7 @@ fn workspace_orientation() -> Section<crate::pages::Message> {
settings::view_section(&section.title)
.add(
cosmic::widget::segmented_selection::horizontal(&page.orientation_model)
.on_activate(|x| Message::OrientationButtonSelected(x)),
.on_activate(Message::OrientationButtonSelected),
)
.apply(Element::from)
.map(crate::pages::Message::DesktopWorkspaces)

View file

@ -14,8 +14,8 @@ use slotmap::SlotMap;
use super::Message;
pub static ADD_INPUT_SOURCE_DIALOGUE_ID: Lazy<window::Id> = Lazy::new(|| window::Id::unique());
pub static SPECIAL_CHARACTER_DIALOGUE_ID: Lazy<window::Id> = Lazy::new(|| window::Id::unique());
pub static ADD_INPUT_SOURCE_DIALOGUE_ID: Lazy<window::Id> = Lazy::new(window::Id::unique);
pub static SPECIAL_CHARACTER_DIALOGUE_ID: Lazy<window::Id> = Lazy::new(window::Id::unique);
static COMPOSE_OPTIONS: &[(&str, &str)] = &[
// ("Left Alt", "compose:lalt"), XXX?

View file

@ -1 +0,0 @@
1.70.0

3
rust-toolchain.toml Normal file
View file

@ -0,0 +1,3 @@
[toolchain]
channel = "1.70.0"
components = ["clippy", "rustfmt"]