Derive a default instead of manual impl
This commit is contained in:
parent
d0a282473e
commit
7c04c9b8d3
1 changed files with 1 additions and 11 deletions
|
|
@ -37,23 +37,13 @@ impl Deadline {
|
||||||
/// A builder type config for more complex uses of [`TextDiff`].
|
/// A builder type config for more complex uses of [`TextDiff`].
|
||||||
///
|
///
|
||||||
/// Requires the `text` feature.
|
/// Requires the `text` feature.
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug, Default)]
|
||||||
pub struct TextDiffConfig {
|
pub struct TextDiffConfig {
|
||||||
algorithm: Algorithm,
|
algorithm: Algorithm,
|
||||||
newline_terminated: Option<bool>,
|
newline_terminated: Option<bool>,
|
||||||
deadline: Option<Deadline>,
|
deadline: Option<Deadline>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for TextDiffConfig {
|
|
||||||
fn default() -> TextDiffConfig {
|
|
||||||
TextDiffConfig {
|
|
||||||
algorithm: Algorithm::default(),
|
|
||||||
newline_terminated: None,
|
|
||||||
deadline: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl TextDiffConfig {
|
impl TextDiffConfig {
|
||||||
/// Changes the algorithm.
|
/// Changes the algorithm.
|
||||||
///
|
///
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue