mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
numfmt: derive default impl for FormatOptions
This commit is contained in:
parent
9a2174ba02
commit
6cc470920f
1 changed files with 1 additions and 14 deletions
|
@ -74,7 +74,7 @@ impl RoundMethod {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Represents the options extracted from the --format argument provided by the user.
|
// Represents the options extracted from the --format argument provided by the user.
|
||||||
#[derive(Debug, PartialEq, Eq)]
|
#[derive(Debug, Default, PartialEq, Eq)]
|
||||||
pub struct FormatOptions {
|
pub struct FormatOptions {
|
||||||
pub grouping: bool,
|
pub grouping: bool,
|
||||||
pub padding: Option<isize>,
|
pub padding: Option<isize>,
|
||||||
|
@ -84,19 +84,6 @@ pub struct FormatOptions {
|
||||||
pub zero_padding: bool,
|
pub zero_padding: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for FormatOptions {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self {
|
|
||||||
grouping: false,
|
|
||||||
padding: None,
|
|
||||||
precision: None,
|
|
||||||
prefix: String::new(),
|
|
||||||
suffix: String::new(),
|
|
||||||
zero_padding: false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl FromStr for FormatOptions {
|
impl FromStr for FormatOptions {
|
||||||
type Err = String;
|
type Err = String;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue