chore: add rustfmt config

This commit is contained in:
Vukašin Vojinović 2026-04-30 16:07:25 +02:00 committed by Ashley Wulber
parent 9abc4d483b
commit 9c2a86a8f4
98 changed files with 419 additions and 540 deletions

View file

@ -1,13 +1,12 @@
use std::{any::TypeId, ops::Deref};
use std::any::TypeId;
use std::ops::Deref;
use crate::{CosmicConfigEntry, Update};
use cosmic_settings_daemon::{Changed, ConfigProxy, CosmicSettingsDaemonProxy};
use futures_util::SinkExt;
use iced_futures::{
Subscription,
futures::{self, StreamExt, future::pending},
stream,
};
use iced_futures::futures::future::pending;
use iced_futures::futures::{self, StreamExt};
use iced_futures::{Subscription, stream};
pub async fn settings_daemon_proxy() -> zbus::Result<CosmicSettingsDaemonProxy<'static>> {
let conn = zbus::Connection::session().await?;

View file

@ -1,16 +1,13 @@
//! Integrations for cosmic-config — the cosmic configuration system.
use notify::{
RecommendedWatcher, Watcher,
event::{EventKind, ModifyKind, RenameMode},
};
use serde::{Serialize, de::DeserializeOwned};
use std::{
env, fmt, fs,
io::Write,
path::{Path, PathBuf},
sync::Mutex,
};
use notify::event::{EventKind, ModifyKind, RenameMode};
use notify::{RecommendedWatcher, Watcher};
use serde::Serialize;
use serde::de::DeserializeOwned;
use std::io::Write;
use std::path::{Path, PathBuf};
use std::sync::Mutex;
use std::{env, fmt, fs};
/// Get the config directory, with Flatpak sandbox support.
/// In Flatpak, HOST_XDG_CONFIG_HOME points to the real user config directory,

View file

@ -1,7 +1,9 @@
use iced_futures::futures::channel::mpsc;
use iced_futures::futures::{SinkExt, Stream};
use iced_futures::{futures::channel::mpsc, stream};
use iced_futures::stream;
use notify::RecommendedWatcher;
use std::{borrow::Cow, hash::Hash};
use std::borrow::Cow;
use std::hash::Hash;
use crate::{Config, CosmicConfigEntry};
@ -77,7 +79,8 @@ async fn start_listening<T: 'static + Send + Sync + PartialEq + Clone + CosmicCo
state: ConfigState<T>,
output: &mut mpsc::Sender<crate::Update<T>>,
) -> ConfigState<T> {
use iced_futures::futures::{StreamExt, future::pending};
use iced_futures::futures::StreamExt;
use iced_futures::futures::future::pending;
match state {
ConfigState::Init(config_id, version, is_state) => {