mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
numfmt: derive default impl for FormatOptions
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user