chore: format for Rust 2024
This commit is contained in:
parent
0a8da05847
commit
1f7f0c70b7
99 changed files with 414 additions and 442 deletions
|
|
@ -2,11 +2,13 @@ use std::{
|
|||
collections::{HashMap, HashSet},
|
||||
fmt,
|
||||
hash::{Hash, Hasher},
|
||||
sync::{mpsc::Receiver, Arc, LazyLock, Mutex},
|
||||
sync::{Arc, LazyLock, Mutex, mpsc::Receiver},
|
||||
};
|
||||
|
||||
use cosmic::{
|
||||
Theme,
|
||||
iced::{
|
||||
Limits, Point as IcedPoint, Size as IcedSize, Task,
|
||||
advanced::{graphics::text::font_system, widget::Tree},
|
||||
event::Event,
|
||||
futures::{FutureExt, StreamExt},
|
||||
|
|
@ -14,19 +16,17 @@ use cosmic::{
|
|||
mouse::{Button as MouseButton, Cursor, Event as MouseEvent, ScrollDelta},
|
||||
touch::{Event as TouchEvent, Finger},
|
||||
window::Event as WindowEvent,
|
||||
Limits, Point as IcedPoint, Size as IcedSize, Task,
|
||||
},
|
||||
iced_core::{clipboard::Null as NullClipboard, id::Id, renderer::Style, Color, Length, Pixels},
|
||||
iced_core::{Color, Length, Pixels, clipboard::Null as NullClipboard, id::Id, renderer::Style},
|
||||
iced_runtime::{
|
||||
Action, Debug,
|
||||
program::{Program as IcedProgram, State},
|
||||
task::into_stream,
|
||||
Action, Debug,
|
||||
},
|
||||
Theme,
|
||||
};
|
||||
use iced_tiny_skia::{
|
||||
graphics::{damage, Viewport},
|
||||
Layer,
|
||||
graphics::{Viewport, damage},
|
||||
};
|
||||
|
||||
use ordered_float::OrderedFloat;
|
||||
|
|
@ -35,15 +35,16 @@ use smithay::{
|
|||
allocator::Fourcc,
|
||||
input::{ButtonState, KeyState},
|
||||
renderer::{
|
||||
element::{
|
||||
memory::{MemoryRenderBuffer, MemoryRenderBufferRenderElement},
|
||||
AsRenderElements, Kind,
|
||||
},
|
||||
ImportMem, Renderer,
|
||||
element::{
|
||||
AsRenderElements, Kind,
|
||||
memory::{MemoryRenderBuffer, MemoryRenderBufferRenderElement},
|
||||
},
|
||||
},
|
||||
},
|
||||
desktop::space::{RenderZindex, SpaceElement},
|
||||
input::{
|
||||
Seat,
|
||||
keyboard::{KeyboardTarget, KeysymHandle, ModifiersState},
|
||||
pointer::{
|
||||
AxisFrame, ButtonEvent, GestureHoldBeginEvent, GestureHoldEndEvent,
|
||||
|
|
@ -55,11 +56,10 @@ use smithay::{
|
|||
DownEvent, MotionEvent as TouchMotionEvent, OrientationEvent, ShapeEvent, TouchTarget,
|
||||
UpEvent,
|
||||
},
|
||||
Seat,
|
||||
},
|
||||
output::Output,
|
||||
reexports::calloop::RegistrationToken,
|
||||
reexports::calloop::{self, futures::Scheduler, LoopHandle},
|
||||
reexports::calloop::{self, LoopHandle, futures::Scheduler},
|
||||
utils::{
|
||||
Buffer as BufferCoords, IsAlive, Logical, Physical, Point, Rectangle, Scale, Serial, Size,
|
||||
Transform,
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ use crate::{config::EdidProduct, shell::zoom::OutputZoomState};
|
|||
use std::{
|
||||
cell::{Ref, RefCell, RefMut},
|
||||
sync::{
|
||||
atomic::{AtomicU8, Ordering},
|
||||
Mutex,
|
||||
atomic::{AtomicU8, Ordering},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use rustix::process::{getrlimit, setrlimit, Resource, Rlimit};
|
||||
use rustix::process::{Resource, Rlimit, getrlimit, setrlimit};
|
||||
use std::sync::atomic::{AtomicU64, Ordering};
|
||||
|
||||
static OLD_LIMIT: AtomicU64 = AtomicU64::new(0);
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ use smithay::{
|
|||
backend::{
|
||||
allocator::Fourcc,
|
||||
renderer::{
|
||||
damage::OutputDamageTracker,
|
||||
element::{surface::WaylandSurfaceRenderElement, AsRenderElements},
|
||||
gles::GlesRenderbuffer,
|
||||
ExportMem, ImportAll, Offscreen, Renderer,
|
||||
damage::OutputDamageTracker,
|
||||
element::{AsRenderElements, surface::WaylandSurfaceRenderElement},
|
||||
gles::GlesRenderbuffer,
|
||||
},
|
||||
},
|
||||
desktop::utils::bbox_from_surface_tree,
|
||||
|
|
@ -18,7 +18,7 @@ use tracing::warn;
|
|||
use crate::{
|
||||
backend::render::RendererRef,
|
||||
shell::element::CosmicSurface,
|
||||
state::{advertised_node_for_surface, State},
|
||||
state::{State, advertised_node_for_surface},
|
||||
};
|
||||
|
||||
pub fn screenshot_window(state: &mut State, surface: &CosmicSurface) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use keyframe::{num_traits::Float, CanTween};
|
||||
use keyframe::{CanTween, num_traits::Float};
|
||||
use smithay::utils::{Coordinate, Point, Rectangle, Size};
|
||||
|
||||
pub struct EasePoint<N: Coordinate, Kind>(pub Point<N, Kind>);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue