From 3425a0f455bab3a245d4e4efcc1d7ba04510b376 Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Tue, 6 Aug 2024 02:24:01 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20rearrange=20imports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/application.rs | 10 +++++----- src/application_browser.rs | 3 ++- src/main.rs | 16 ++++++++-------- src/utils.rs | 3 ++- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/application.rs b/src/application.rs index 67e43c3..57aa1ab 100644 --- a/src/application.rs +++ b/src/application.rs @@ -1,13 +1,13 @@ +use crate::config::{APP_ID, PKGDATADIR, VERSION}; +use crate::widgets::MainWindow; + +use std::path::Path; + use gtk::gio; use gtk::glib::{self, clone, WeakRef}; use gtk::prelude::*; use gtk::subclass::prelude::*; use once_cell::sync::OnceCell; - -use std::path::Path; - -use crate::config::{APP_ID, PKGDATADIR, VERSION}; -use crate::widgets::MainWindow; /* mod imp { use super::*; diff --git a/src/application_browser.rs b/src/application_browser.rs index d87bdb5..1822087 100644 --- a/src/application_browser.rs +++ b/src/application_browser.rs @@ -1,6 +1,8 @@ use crate::alpm_helper::*; use crate::{fl, utils}; +use std::sync::Mutex; + use gtk::gio::prelude::*; use gtk::prelude::{ BoxExt, ButtonExt, CellRendererExt, CellRendererTextExt, CellRendererToggleExt, ComboBoxExt, @@ -10,7 +12,6 @@ use gtk::prelude::{ }; use once_cell::sync::Lazy; -use std::sync::Mutex; #[derive(Debug)] pub struct ApplicationBrowser { diff --git a/src/main.rs b/src/main.rs index 34beba3..a3dbf99 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,24 +14,24 @@ mod utils; use config::{APP_ID, PROFILE, VERSION}; use data_types::*; -use gtk::glib::GString; -use gtk::{gdk, glib, Builder, HeaderBar, Window}; -use i18n_embed::DesktopLanguageRequester; -use once_cell::sync::Lazy; +use utils::*; + use std::collections::HashMap; use std::path::Path; use std::sync::{Arc, Mutex}; -use unic_langid::LanguageIdentifier; -use utils::*; +use std::{fs, str}; use gtk::gio::prelude::*; use gtk::prelude::*; use gtk::gdk_pixbuf::Pixbuf; - +use gtk::glib::GString; +use gtk::{gdk, glib, Builder, HeaderBar, Window}; +use i18n_embed::DesktopLanguageRequester; +use once_cell::sync::Lazy; use serde_json::json; -use std::{fs, str}; use subprocess::Exec; +use unic_langid::LanguageIdentifier; const RESPREFIX: &str = "/org/cachyos/hello"; diff --git a/src/utils.rs b/src/utils.rs index ba37cb0..f653999 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,8 +1,9 @@ -use gtk::prelude::*; use std::fs::File; use std::path::Path; use std::{fs, slice, str}; +use gtk::prelude::*; + use subprocess::{Exec, Redirection}; #[derive(Debug)]