mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 21:47: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 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_usage, help_about, help_section, help_usage, show};
|
||||
use uucore::{format_usage, help_about, help_section, help_usage};
|
||||
|
||||
const VERSION: &str = "version";
|
||||
const HELP: &str = "help";
|
||||
|
@ -49,15 +49,10 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||
|
||||
while args.peek().is_some() {
|
||||
for item in parse_spec_and_escape(format_string.as_ref()) {
|
||||
match item {
|
||||
Ok(item) => {
|
||||
match item.write(stdout(), &mut args)? {
|
||||
ControlFlow::Continue(()) => {}
|
||||
ControlFlow::Break(()) => return Ok(()),
|
||||
};
|
||||
}
|
||||
Err(e) => show!(e),
|
||||
}
|
||||
match item?.write(stdout(), &mut args)? {
|
||||
ControlFlow::Continue(()) => {}
|
||||
ControlFlow::Break(()) => return Ok(()),
|
||||
};
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// For the full copyright and license information, please view the LICENSE
|
||||
// file that was distributed with this source code.
|
||||
// spell-checker:ignore extendedbigdecimal extendedbigint
|
||||
// spell-checker:ignore extendedbigdecimal
|
||||
use num_traits::Zero;
|
||||
|
||||
use crate::extendedbigdecimal::ExtendedBigDecimal;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// For the full copyright and license information, please view the LICENSE
|
||||
// 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`.
|
||||
//!
|
||||
//! This module provides an implementation of [`FromStr`] for the
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// For the full copyright and license information, please view the LICENSE
|
||||
// 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 clap::{crate_version, Arg, ArgAction, Command};
|
||||
|
|
|
@ -28,7 +28,6 @@ pub enum UnsignedIntVariant {
|
|||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
|
||||
pub enum FloatVariant {
|
||||
Decimal,
|
||||
Scientific,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue