rustfmt the code
This commit is contained in:
parent
4280abe67c
commit
7c7f5fa5d4
src/uu
@ -3,11 +3,11 @@
|
||||
// For the full copyright and license information, please view the LICENSE
|
||||
// file that was distributed with this source code.
|
||||
|
||||
use regex::Regex;
|
||||
use uucore::{error::UResult, format_usage, help_about, help_usage};
|
||||
use clap::{crate_version, Command};
|
||||
use std::{fs};
|
||||
use regex::Regex;
|
||||
use std::fs;
|
||||
use sysinfo::System;
|
||||
use uucore::{error::UResult, format_usage, help_about, help_usage};
|
||||
|
||||
const ABOUT: &str = help_about!("lscpu.md");
|
||||
const USAGE: &str = help_usage!("lscpu.md");
|
||||
@ -41,11 +41,10 @@ fn get_architecture() -> String {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pub fn uu_app() -> Command {
|
||||
Command::new(uucore::util_name())
|
||||
.version(crate_version!())
|
||||
.about(ABOUT)
|
||||
.override_usage(format_usage(USAGE))
|
||||
.infer_long_args(true)
|
||||
}
|
||||
}
|
||||
|
@ -3,19 +3,18 @@
|
||||
// For the full copyright and license information, please view the LICENSE
|
||||
// file that was distributed with this source code.
|
||||
|
||||
use clap::{crate_version, Command};
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
use std::process;
|
||||
use uucore::{error::UResult, format_usage, help_about, help_usage};
|
||||
use clap::{crate_version, Command};
|
||||
|
||||
const ABOUT: &str = help_about!("mountpoint.md");
|
||||
const USAGE: &str = help_usage!("mountpoint.md");
|
||||
|
||||
#[uucore::main]
|
||||
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||
|
||||
let args: Vec<String> = env::args().collect();
|
||||
|
||||
if args.len() != 2 {
|
||||
@ -49,11 +48,10 @@ fn is_mountpoint(path: &str) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pub fn uu_app() -> Command {
|
||||
Command::new(uucore::util_name())
|
||||
.version(crate_version!())
|
||||
.about(ABOUT)
|
||||
.override_usage(format_usage(USAGE))
|
||||
.infer_long_args(true)
|
||||
}
|
||||
}
|
||||
|
@ -3,11 +3,11 @@
|
||||
// For the full copyright and license information, please view the LICENSE
|
||||
// file that was distributed with this source code.
|
||||
|
||||
use clap::{crate_version, Command};
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::path::Path;
|
||||
use std::process;
|
||||
use clap::{crate_version, Command};
|
||||
|
||||
use uucore::{error::UResult, format_usage, help_about, help_usage};
|
||||
|
||||
@ -42,4 +42,4 @@ pub fn uu_app() -> Command {
|
||||
.about(ABOUT)
|
||||
.override_usage(format_usage(USAGE))
|
||||
.infer_long_args(true)
|
||||
}
|
||||
}
|
||||
|
@ -47,4 +47,4 @@ pub fn uu_app() -> Command {
|
||||
.about(ABOUT)
|
||||
.override_usage(format_usage(USAGE))
|
||||
.infer_long_args(true)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user