1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 03:57:44 +00:00

numfmt: derive default impl for FormatOptions

This commit is contained in:
Daniel Hofstetter 2022-11-30 16:52:27 +01:00
parent 9a2174ba02
commit 6cc470920f

View file

@ -74,7 +74,7 @@ impl RoundMethod {
}
// 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 grouping: bool,
pub padding: Option<isize>,
@ -84,19 +84,6 @@ pub struct FormatOptions {
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 {
type Err = String;