chore: Rust 2024 edition
Set the formatting style to 2021 edition to avoid disrupting existing work. Remove when possible.
This commit is contained in:
parent
35d781dc1e
commit
7f7ab8bcbe
19 changed files with 494 additions and 506 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use super::{
|
||||
CosmicSurface,
|
||||
window::{Focus, RESIZE_BORDER},
|
||||
CosmicSurface,
|
||||
};
|
||||
use crate::{
|
||||
backend::render::cursor::CursorState,
|
||||
|
|
@ -17,12 +17,11 @@ use crate::{
|
|||
};
|
||||
use calloop::LoopHandle;
|
||||
use cosmic::{
|
||||
Apply, Element as CosmicElement, Theme,
|
||||
iced::{Alignment, id::Id, widget as iced_widget},
|
||||
iced_core::{Background, Border, Color, Length, border::Radius},
|
||||
iced::{id::Id, widget as iced_widget, Alignment},
|
||||
iced_core::{border::Radius, Background, Border, Color, Length},
|
||||
iced_runtime::Task,
|
||||
iced_widget::scrollable::AbsoluteOffset,
|
||||
theme, widget as cosmic_widget,
|
||||
theme, widget as cosmic_widget, Apply, Element as CosmicElement, Theme,
|
||||
};
|
||||
use cosmic_settings_config::shortcuts;
|
||||
use shortcuts::action::{Direction, FocusDirection};
|
||||
|
|
@ -30,16 +29,15 @@ use smithay::{
|
|||
backend::{
|
||||
input::KeyState,
|
||||
renderer::{
|
||||
ImportAll, ImportMem, Renderer,
|
||||
element::{
|
||||
AsRenderElements, memory::MemoryRenderBufferRenderElement,
|
||||
surface::WaylandSurfaceRenderElement,
|
||||
memory::MemoryRenderBufferRenderElement, surface::WaylandSurfaceRenderElement,
|
||||
AsRenderElements,
|
||||
},
|
||||
ImportAll, ImportMem, Renderer,
|
||||
},
|
||||
},
|
||||
desktop::{WindowSurfaceType, space::SpaceElement},
|
||||
desktop::{space::SpaceElement, WindowSurfaceType},
|
||||
input::{
|
||||
Seat,
|
||||
keyboard::{KeyboardTarget, KeysymHandle, ModifiersState},
|
||||
pointer::{
|
||||
AxisFrame, ButtonEvent, CursorImageStatus, GestureHoldBeginEvent, GestureHoldEndEvent,
|
||||
|
|
@ -51,6 +49,7 @@ use smithay::{
|
|||
DownEvent, MotionEvent as TouchMotionEvent, OrientationEvent, ShapeEvent, TouchTarget,
|
||||
UpEvent,
|
||||
},
|
||||
Seat,
|
||||
},
|
||||
output::Output,
|
||||
reexports::wayland_server::protocol::wl_surface::WlSurface,
|
||||
|
|
@ -63,8 +62,8 @@ use std::{
|
|||
fmt,
|
||||
hash::Hash,
|
||||
sync::{
|
||||
Arc, LazyLock, Mutex,
|
||||
atomic::{AtomicBool, AtomicU8, AtomicUsize, Ordering},
|
||||
Arc, LazyLock, Mutex,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -314,7 +313,11 @@ impl CosmicStack {
|
|||
if let Ok(old) =
|
||||
p.active
|
||||
.fetch_update(Ordering::SeqCst, Ordering::SeqCst, |val| {
|
||||
if val < max - 1 { Some(val + 1) } else { None }
|
||||
if val < max - 1 {
|
||||
Some(val + 1)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
{
|
||||
p.previous_keyboard.store(old, Ordering::SeqCst);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue