Properly formatted code

This commit is contained in:
omagdy7 2024-06-03 12:05:29 +03:00 committed by sxyazi
parent e6552de2ef
commit 96a894f67d
No known key found for this signature in database

View file

@ -1,35 +1,25 @@
use std::{ use std::{collections::HashSet, env, ffi::OsString, fmt::Write, path::{Path, PathBuf}, process};
collections::HashSet,
env,
ffi::OsString,
fmt::Write,
path::{Path, PathBuf},
process,
};
use clap::Parser; use clap::Parser;
use serde::Serialize; use serde::Serialize;
use yazi_config::PREVIEW; use yazi_config::PREVIEW;
use yazi_shared::{ use yazi_shared::{fs::{current_cwd, expand_path}, Xdg};
fs::{current_cwd, expand_path},
Xdg,
};
use super::Args; use super::Args;
use crate::ARGS; use crate::ARGS;
#[derive(Debug, Serialize)] #[derive(Debug, Serialize)]
pub struct Boot { pub struct Boot {
pub cwd: PathBuf, pub cwd: PathBuf,
pub file: Option<OsString>, pub file: Option<OsString>,
pub local_events: HashSet<String>, pub local_events: HashSet<String>,
pub remote_events: HashSet<String>, pub remote_events: HashSet<String>,
pub config_dir: PathBuf, pub config_dir: PathBuf,
pub flavor_dir: PathBuf, pub flavor_dir: PathBuf,
pub plugin_dir: PathBuf, pub plugin_dir: PathBuf,
pub state_dir: PathBuf, pub state_dir: PathBuf,
} }
impl Boot { impl Boot {
@ -57,10 +47,7 @@ impl Boot {
} }
fn action_debug() -> Result<String, std::fmt::Error> { fn action_debug() -> Result<String, std::fmt::Error> {
use std::{ use std::{env::consts::{ARCH, FAMILY, OS}, process::Command};
env::consts::{ARCH, FAMILY, OS},
process::Command,
};
let mut s = String::new(); let mut s = String::new();
writeln!(s, "\nYazi")?; writeln!(s, "\nYazi")?;