summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-05-29 15:40:35 -0400
committerDan Davison <dandavison7@gmail.com>2020-05-29 18:49:01 -0400
commitfeac36202aa41ff9264391e360316fbdc96b6708 (patch)
treebff882b1632f54098185b8f68dc3fcf3a30ed1c4
parent3fcc6b612a60c71632e2650e775e2de60c0bbd8d (diff)
Change decoration style enum variant name: Omit => NoDecoration
-rw-r--r--src/delta.rs6
-rw-r--r--src/style.rs8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/delta.rs b/src/delta.rs
index e8dbb97f..2239aea9 100644
--- a/src/delta.rs
+++ b/src/delta.rs
@@ -208,7 +208,7 @@ fn handle_commit_meta_header_line(
decoration_ansi_term_style = style;
draw::write_underoverlined
}
- Some(DecorationStyle::Omit) => return Ok(()),
+ Some(DecorationStyle::NoDecoration) => return Ok(()),
None => unreachable("Unreachable code path reached in handle_commit_meta_header_line."),
};
draw_fn(
@@ -259,7 +259,7 @@ fn handle_generic_file_meta_header_line(
decoration_ansi_term_style = style;
draw::write_underoverlined
}
- Some(DecorationStyle::Omit) => return Ok(()),
+ Some(DecorationStyle::NoDecoration) => return Ok(()),
None => {
unreachable("Unreachable code path reached in handle_generic_file_meta_header_line.")
}
@@ -301,7 +301,7 @@ fn handle_hunk_header_line(
decoration_ansi_term_style = style;
draw::write_underoverlined
}
- Some(DecorationStyle::Omit) => return Ok(()),
+ Some(DecorationStyle::NoDecoration) => return Ok(()),
None => unreachable("Unreachable code path reached in handle_hunk_header_line."),
};
let (raw_code_fragment, line_number) = parse::parse_hunk_metadata(&line);
diff --git a/src/style.rs b/src/style.rs
index 081aa5a6..a09405c8 100644
--- a/src/style.rs
+++ b/src/style.rs
@@ -18,7 +18,7 @@ pub enum DecorationStyle {
Underline(ansi_term::Style),
Overline(ansi_term::Style),
Underoverline(ansi_term::Style),
- Omit,
+ NoDecoration,
}
impl Style {
@@ -168,7 +168,7 @@ impl DecorationStyle {
"ul" => Some(DecorationStyle::Underline(style)),
"overline" => Some(DecorationStyle::Overline(style)),
"underoverline" => Some(DecorationStyle::Underoverline(style)),
- "omit" => Some(DecorationStyle::Omit),
+ "omit" => Some(DecorationStyle::NoDecoration),
"plain" => None,
_ => unreachable("Unreachable code path reached in parse_decoration_style."),
}
@@ -185,7 +185,7 @@ impl DecorationStyle {
Some(DecorationStyle::Underline(ansi_term_style)) => ansi_term_style,
Some(DecorationStyle::Overline(ansi_term_style)) => ansi_term_style,
Some(DecorationStyle::Underoverline(ansi_term_style)) => ansi_term_style,
- Some(DecorationStyle::Omit) => ansi_term::Style::new(),
+ Some(DecorationStyle::NoDecoration) => ansi_term::Style::new(),
};
match DecorationStyle::from_str(special_attribute, true_color) {
Some(DecorationStyle::Box(_)) => Some(DecorationStyle::Box(ansi_term_style)),
@@ -196,7 +196,7 @@ impl DecorationStyle {
Some(DecorationStyle::Underoverline(_)) => {
Some(DecorationStyle::Underoverline(ansi_term_style))
}
- Some(DecorationStyle::Omit) => Some(DecorationStyle::Omit),
+ Some(DecorationStyle::NoDecoration) => Some(DecorationStyle::NoDecoration),
None => None,
}
}