chore: cargo fmt

This commit is contained in:
Ashley Wulber 2026-06-25 15:27:31 -04:00 committed by Ashley Wulber
parent 633ed14411
commit c781ff6199
24 changed files with 192 additions and 172 deletions

View file

@ -1,5 +1,5 @@
use iced::widget::{button, column, text, Column};
use iced::Center;
use iced::widget::{Column, button, column, text};
pub fn main() -> iced::Result {
iced::run(Counter::update, Counter::view)
@ -42,7 +42,7 @@ impl Counter {
#[cfg(test)]
mod tests {
use super::*;
use iced_test::{Error, simulator};
use iced_test::{simulator, Error};
#[test]
fn it_counts() -> Result<(), Error> {

View file

@ -3,20 +3,20 @@ use std::{
sync::atomic::{AtomicU64, Ordering},
};
use iced::{Element, id::Id};
use iced::{
Event, Length, Rectangle,
clipboard::{
dnd::{self, DndAction, DndDestinationRectangle, DndEvent, OfferEvent},
mime::AllowedMimeTypes,
},
event,
id::Internal,
mouse, overlay,
mouse, overlay, Event, Length, Rectangle,
};
use iced::{id::Id, Element};
use iced_core::{
self, Clipboard, Layout, Shell, Widget, layout,
widget::{Tree, tree},
self, layout,
widget::{tree, Tree},
Clipboard, Layout, Shell, Widget,
};
pub fn dnd_destination<'a, Message: 'static>(

View file

@ -1,16 +1,16 @@
use std::any::Any;
use iced::Element;
use iced::id::Id;
use iced::widget::container;
use iced::Element;
use iced::{
Event, Length, Point, Rectangle,
clipboard::dnd::{DndAction, DndEvent, SourceEvent},
event, mouse, overlay,
event, mouse, overlay, Event, Length, Point, Rectangle,
};
use iced_core::{
Clipboard, Shell, layout, renderer,
widget::{Tree, tree},
layout, renderer,
widget::{tree, Tree},
Clipboard, Shell,
};
use iced_core::{Layout, Widget};
@ -37,11 +37,11 @@ pub struct DndSource<'a, Message, AppMessage, D> {
}
impl<
'a,
Message: 'static,
AppMessage: 'static,
D: iced::clipboard::mime::AsMimeTypes + std::marker::Send + 'static,
> DndSource<'a, Message, AppMessage, D>
'a,
Message: 'static,
AppMessage: 'static,
D: iced::clipboard::mime::AsMimeTypes + std::marker::Send + 'static,
> DndSource<'a, Message, AppMessage, D>
{
pub fn new(child: impl Into<Element<'a, Message>>) -> Self {
Self {
@ -119,11 +119,11 @@ impl<
}
impl<
'a,
Message: 'static,
AppMessage: 'static,
D: iced::clipboard::mime::AsMimeTypes + std::marker::Send + 'static,
> Widget<Message, iced::Theme, iced::Renderer>
'a,
Message: 'static,
AppMessage: 'static,
D: iced::clipboard::mime::AsMimeTypes + std::marker::Send + 'static,
> Widget<Message, iced::Theme, iced::Renderer>
for DndSource<'a, Message, AppMessage, D>
{
fn children(&self) -> Vec<Tree> {
@ -357,11 +357,11 @@ impl<
}
impl<
'a,
Message: 'static,
AppMessage: 'static,
D: iced::clipboard::mime::AsMimeTypes + std::marker::Send + 'static,
> From<DndSource<'a, Message, AppMessage, D>> for Element<'a, Message>
'a,
Message: 'static,
AppMessage: 'static,
D: iced::clipboard::mime::AsMimeTypes + std::marker::Send + 'static,
> From<DndSource<'a, Message, AppMessage, D>> for Element<'a, Message>
{
fn from(e: DndSource<'a, Message, AppMessage, D>) -> Element<'a, Message> {
Element::new(e)

View file

@ -7,7 +7,6 @@ use cctk::sctk::reexports::{
use iced::platform_specific::shell::commands::subsurface::get_subsurface;
use iced::{
Element, Length, Subscription, Task,
event::wayland::Event as WaylandEvent,
platform_specific::{
runtime::wayland::subsurface::SctkSubsurfaceSettings,
@ -15,6 +14,7 @@ use iced::{
},
widget::{button, column, text, text_input},
window::{self, Id, Settings},
Element, Length, Subscription, Task,
};
use std::sync::{Arc, Mutex};