From 7c04c9b8d306d38371024d1d8656ef1152f2d1c3 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 23 Jan 2022 21:02:59 +0100 Subject: [PATCH] Derive a default instead of manual impl --- src/text/mod.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/text/mod.rs b/src/text/mod.rs index b1a45f3..729af35 100644 --- a/src/text/mod.rs +++ b/src/text/mod.rs @@ -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, deadline: Option, } -impl Default for TextDiffConfig { - fn default() -> TextDiffConfig { - TextDiffConfig { - algorithm: Algorithm::default(), - newline_terminated: None, - deadline: None, - } - } -} - impl TextDiffConfig { /// Changes the algorithm. ///