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

sort: derive Default impl for FieldSelector

This commit is contained in:
Jan Verbeek 2021-09-10 19:25:45 +02:00
parent fc77e51b64
commit 91d39de16e

View file

@ -800,7 +800,7 @@ impl Default for KeyPosition {
}
}
#[derive(Clone, PartialEq, Debug)]
#[derive(Clone, PartialEq, Debug, Default)]
struct FieldSelector {
from: KeyPosition,
to: Option<KeyPosition>,
@ -812,18 +812,6 @@ struct FieldSelector {
needs_selection: bool,
}
impl Default for FieldSelector {
fn default() -> Self {
Self {
from: Default::default(),
to: None,
settings: Default::default(),
needs_tokens: false,
needs_selection: false,
}
}
}
impl FieldSelector {
/// Splits this position into the actual position and the attached options.
fn split_key_options(position: &str) -> (&str, &str) {