mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-02 05:57:46 +00:00
printf: remove whitespace, remove redundant spelling ignore and revert matching on result
This commit is contained in:
parent
e95add7940
commit
8eb66ab7ea
5 changed files with 9 additions and 15 deletions
|
@ -10,9 +10,9 @@ use std::io::stdout;
|
||||||
use std::ops::ControlFlow;
|
use std::ops::ControlFlow;
|
||||||
|
|
||||||
use clap::{crate_version, Arg, ArgAction, Command};
|
use clap::{crate_version, Arg, ArgAction, Command};
|
||||||
use uucore::error::{UError, UResult, UUsageError};
|
use uucore::error::{UResult, UUsageError};
|
||||||
use uucore::format::{parse_spec_and_escape, FormatArgument};
|
use uucore::format::{parse_spec_and_escape, FormatArgument};
|
||||||
use uucore::{format_usage, help_about, help_section, help_usage, show};
|
use uucore::{format_usage, help_about, help_section, help_usage};
|
||||||
|
|
||||||
const VERSION: &str = "version";
|
const VERSION: &str = "version";
|
||||||
const HELP: &str = "help";
|
const HELP: &str = "help";
|
||||||
|
@ -49,16 +49,11 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
|
|
||||||
while args.peek().is_some() {
|
while args.peek().is_some() {
|
||||||
for item in parse_spec_and_escape(format_string.as_ref()) {
|
for item in parse_spec_and_escape(format_string.as_ref()) {
|
||||||
match item {
|
match item?.write(stdout(), &mut args)? {
|
||||||
Ok(item) => {
|
|
||||||
match item.write(stdout(), &mut args)? {
|
|
||||||
ControlFlow::Continue(()) => {}
|
ControlFlow::Continue(()) => {}
|
||||||
ControlFlow::Break(()) => return Ok(()),
|
ControlFlow::Break(()) => return Ok(()),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Err(e) => show!(e),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
//
|
//
|
||||||
// For the full copyright and license information, please view the LICENSE
|
// For the full copyright and license information, please view the LICENSE
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
// spell-checker:ignore extendedbigdecimal extendedbigint
|
// spell-checker:ignore extendedbigdecimal
|
||||||
use num_traits::Zero;
|
use num_traits::Zero;
|
||||||
|
|
||||||
use crate::extendedbigdecimal::ExtendedBigDecimal;
|
use crate::extendedbigdecimal::ExtendedBigDecimal;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
//
|
//
|
||||||
// For the full copyright and license information, please view the LICENSE
|
// For the full copyright and license information, please view the LICENSE
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
// spell-checker:ignore extendedbigdecimal extendedbigint bigdecimal numberparse
|
// spell-checker:ignore extendedbigdecimal bigdecimal numberparse
|
||||||
//! Parsing numbers for use in `seq`.
|
//! Parsing numbers for use in `seq`.
|
||||||
//!
|
//!
|
||||||
//! This module provides an implementation of [`FromStr`] for the
|
//! This module provides an implementation of [`FromStr`] for the
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
//
|
//
|
||||||
// For the full copyright and license information, please view the LICENSE
|
// For the full copyright and license information, please view the LICENSE
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
// spell-checker:ignore (ToDO) istr chiter argptr ilen extendedbigdecimal extendedbigint numberparse
|
// spell-checker:ignore (ToDO) extendedbigdecimal numberparse
|
||||||
use std::io::{stdout, ErrorKind, Write};
|
use std::io::{stdout, ErrorKind, Write};
|
||||||
|
|
||||||
use clap::{crate_version, Arg, ArgAction, Command};
|
use clap::{crate_version, Arg, ArgAction, Command};
|
||||||
|
|
|
@ -28,7 +28,6 @@ pub enum UnsignedIntVariant {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
|
|
||||||
pub enum FloatVariant {
|
pub enum FloatVariant {
|
||||||
Decimal,
|
Decimal,
|
||||||
Scientific,
|
Scientific,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue