Skip to content

Commit

Permalink
rustfmt the code
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvestre committed Jan 26, 2024
1 parent 4280abe commit 7c7f5fa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
9 changes: 4 additions & 5 deletions src/uu/lscpu/src/lscpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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)
}
}
6 changes: 2 additions & 4 deletions src/uu/mountpoint/src/mountpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
}
4 changes: 2 additions & 2 deletions src/uu/pwdx/src/pwdx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -42,4 +42,4 @@ pub fn uu_app() -> Command {
.about(ABOUT)
.override_usage(format_usage(USAGE))
.infer_long_args(true)
}
}
2 changes: 1 addition & 1 deletion src/uu/renice/src/renice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ pub fn uu_app() -> Command {
.about(ABOUT)
.override_usage(format_usage(USAGE))
.infer_long_args(true)
}
}

0 comments on commit 7c7f5fa

Please sign in to comment.