Skip to content

Commit

Permalink
chore: rust-toolchain.toml; cargo clippy --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jokeyrhyme authored and mmstick committed Jan 18, 2024
1 parent 0ec99c4 commit 039aeb1
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/src/pages/desktop/appearance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/desktop/dock/applets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions app/src/pages/desktop/panel/applets_inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>,
Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/desktop/wallpaper/widgets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
6 changes: 3 additions & 3 deletions app/src/pages/desktop/workspaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions app/src/pages/input/keyboard/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "1.70.0"
components = ["clippy", "rustfmt"]

0 comments on commit 039aeb1

Please sign in to comment.