Skip to content

Commit

Permalink
Derive a default instead of manual impl
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Jan 23, 2022
1 parent d0a2824 commit 7c04c9b
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/text/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,13 @@ impl Deadline {
/// A builder type config for more complex uses of [`TextDiff`].
///
/// Requires the `text` feature.
#[derive(Clone, Debug)]
#[derive(Clone, Debug, Default)]
pub struct TextDiffConfig {
algorithm: Algorithm,
newline_terminated: Option<bool>,
deadline: Option<Deadline>,
}

impl Default for TextDiffConfig {
fn default() -> TextDiffConfig {
TextDiffConfig {
algorithm: Algorithm::default(),
newline_terminated: None,
deadline: None,
}
}
}

impl TextDiffConfig {
/// Changes the algorithm.
///
Expand Down

0 comments on commit 7c04c9b

Please sign in to comment.