mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 06:26:14 -05:00
style: reorder use statements for consistency across multiple files
This commit is contained in:
18 files changed
+21
-21
No files matched your search
@@ -1,7 +1,7 @@
|
||||
use anyhow::bail;
|
||||
use gpapi::{
|
||||
gp_params::GpParams,
|
||||
portal::{prelogin, Prelogin},
|
||||
portal::{Prelogin, prelogin},
|
||||
};
|
||||
|
||||
#[cfg(feature = "browser-auth")]
|
||||
|
||||
@@ -2,7 +2,7 @@ use anyhow::bail;
|
||||
use gpapi::{auth::SamlAuthData, error::AuthDataParseError};
|
||||
use log::{error, info};
|
||||
use regex::Regex;
|
||||
use tokio::sync::{mpsc, RwLock};
|
||||
use tokio::sync::{RwLock, mpsc};
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use block2::RcBlock;
|
||||
use log::warn;
|
||||
use objc2::runtime::AnyObject;
|
||||
use objc2_foundation::{NSError, NSString, NSURLRequest, NSURL};
|
||||
use objc2_foundation::{NSError, NSString, NSURL, NSURLRequest};
|
||||
use objc2_web_kit::WKWebView;
|
||||
use tauri::webview::PlatformWebview;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ use gpapi::utils::redact::redact_uri;
|
||||
use log::warn;
|
||||
use tauri::webview::PlatformWebview;
|
||||
use webkit2gtk::{
|
||||
gio::Cancellable, glib::GString, LoadEvent, TLSErrorsPolicy, URIResponseExt, WebResource, WebResourceExt, WebViewExt,
|
||||
WebsiteDataManagerExt,
|
||||
LoadEvent, TLSErrorsPolicy, URIResponseExt, WebResource, WebResourceExt, WebViewExt, WebsiteDataManagerExt,
|
||||
gio::Cancellable, glib::GString,
|
||||
};
|
||||
|
||||
use super::{
|
||||
|
||||
@@ -4,8 +4,8 @@ use anyhow::bail;
|
||||
use gpapi::{auth::SamlAuthData, gp_params::GpParams, utils::redact::redact_uri};
|
||||
use log::{info, warn};
|
||||
use tauri::{
|
||||
webview::{PageLoadEvent, PageLoadPayload},
|
||||
AppHandle, WebviewUrl, WebviewWindow, WindowEvent,
|
||||
webview::{PageLoadEvent, PageLoadPayload},
|
||||
};
|
||||
use tokio::{sync::oneshot, time};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use clap::{builder::PossibleValue, ValueEnum};
|
||||
use clap::{ValueEnum, builder::PossibleValue};
|
||||
|
||||
use crate::gp_params::ClientOs;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
pub mod hip;
|
||||
mod login;
|
||||
mod parse_gateways;
|
||||
pub mod hip;
|
||||
|
||||
pub use login::*;
|
||||
pub(crate) use parse_gateways::*;
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::sync::OnceLock;
|
||||
|
||||
use anyhow::bail;
|
||||
use env_logger::Logger;
|
||||
use log::{warn, Level};
|
||||
use log::{Level, warn};
|
||||
use log_reload::{ReloadHandle, ReloadLog};
|
||||
|
||||
static LOG_HANDLE: OnceLock<ReloadHandle<log_reload::LevelFilter<Logger>>> = OnceLock::new();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use base64::{engine::general_purpose, Engine};
|
||||
use base64::{Engine, engine::general_purpose};
|
||||
|
||||
pub fn encode(data: &[u8]) -> String {
|
||||
let engine = general_purpose::STANDARD;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use chacha20poly1305::{
|
||||
aead::{Aead, OsRng},
|
||||
AeadCore, ChaCha20Poly1305, Key, KeyInit,
|
||||
aead::{Aead, OsRng},
|
||||
};
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
use serde::{Serialize, de::DeserializeOwned};
|
||||
|
||||
pub fn generate_key() -> Key {
|
||||
ChaCha20Poly1305::generate_key(&mut OsRng)
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::path::Path;
|
||||
use log::{info, warn};
|
||||
use regex::Regex;
|
||||
use tempfile::NamedTempFile;
|
||||
use version_compare::{compare_to, Cmp};
|
||||
use version_compare::{Cmp, compare_to};
|
||||
|
||||
pub fn openssl_conf() -> String {
|
||||
let option = get_openssl_option();
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::sync::RwLock;
|
||||
|
||||
use redact_engine::{Pattern, Redaction as RedactEngine};
|
||||
use regex::Regex;
|
||||
use url::{form_urlencoded, Url};
|
||||
use url::{Url, form_urlencoded};
|
||||
|
||||
pub struct Redaction {
|
||||
redact_engine: RwLock<Option<RedactEngine>>,
|
||||
|
||||
@@ -23,9 +23,9 @@ mod unix {
|
||||
|
||||
use anyhow::bail;
|
||||
use gtk::{
|
||||
EventBox,
|
||||
glib::Cast,
|
||||
traits::{EventBoxExt, GtkWindowExt, WidgetExt},
|
||||
EventBox,
|
||||
};
|
||||
use log::info;
|
||||
use tauri::WebviewWindow;
|
||||
|
||||
Reference in new issue
Block a user