mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Properly formatted code
This commit is contained in:
parent
e6552de2ef
commit
96a894f67d
1 changed files with 6 additions and 19 deletions
|
|
@ -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")?;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue