diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-06-04 13:07:58 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-06-04 13:07:58 -0400 |
commit | a68005de950322594f86220cffff2d52e0b2aa6b (patch) | |
tree | 04ca2d03e8c3c701190bfd6ab4fa4797d205bced /src/config.rs | |
parent | c864695d84ddfabcd65fd2311a78c6c9bcb14235 (diff) |
Sort config struct fields by name
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/src/config.rs b/src/config.rs index 5a01a771..5b4afb54 100644 --- a/src/config.rs +++ b/src/config.rs @@ -21,39 +21,39 @@ pub enum Width { } pub struct Config<'a> { - pub theme: Option<Theme>, - pub theme_name: String, + pub background_color_extends_to_terminal_width: bool, + pub commit_style: Style, + pub decorations_width: Width, pub dummy_theme: Theme, + pub file_added_label: String, + pub file_modified_label: String, + pub file_removed_label: String, + pub file_renamed_label: String, + pub file_style: Style, + pub hunk_header_style: Style, + pub max_buffered_lines: usize, pub max_line_distance: f64, pub max_line_distance_for_naively_paired_lines: f64, - pub minus_style: Style, pub minus_emph_style: Style, - pub minus_non_emph_style: Style, - pub zero_style: Style, - pub plus_style: Style, - pub plus_emph_style: Style, - pub plus_non_emph_style: Style, + pub minus_file: Option<PathBuf>, pub minus_line_marker: &'a str, - pub plus_line_marker: &'a str, - pub commit_style: Style, - pub file_style: Style, - pub hunk_header_style: Style, + pub minus_non_emph_style: Style, + pub minus_style: Style, pub navigate: bool, - pub file_modified_label: String, - pub file_removed_label: String, - pub file_added_label: String, - pub file_renamed_label: String, - pub syntax_set: SyntaxSet, - pub decorations_width: Width, - pub true_color: bool, - pub background_color_extends_to_terminal_width: bool, - pub tab_width: usize, pub null_style: Style, pub null_syntect_style: SyntectStyle, - pub max_buffered_lines: usize, pub paging_mode: PagingMode, - pub minus_file: Option<PathBuf>, + pub plus_emph_style: Style, pub plus_file: Option<PathBuf>, + pub plus_line_marker: &'a str, + pub plus_non_emph_style: Style, + pub plus_style: Style, + pub syntax_set: SyntaxSet, + pub tab_width: usize, + pub theme: Option<Theme>, + pub theme_name: String, + pub true_color: bool, + pub zero_style: Style, } impl<'a> Config<'a> { @@ -144,39 +144,39 @@ pub fn get_config<'a>( .unwrap_or(0.0); Config { - theme, - theme_name, + background_color_extends_to_terminal_width, + commit_style, + decorations_width, dummy_theme, + file_added_label: opt.file_added_label, + file_modified_label: opt.file_modified_label, + file_removed_label: opt.file_removed_label, + file_renamed_label: opt.file_renamed_label, + file_style, + hunk_header_style, + max_buffered_lines: 32, max_line_distance: opt.max_line_distance, max_line_distance_for_naively_paired_lines, - minus_style, minus_emph_style, - minus_non_emph_style, - zero_style, - plus_style, - plus_emph_style, - plus_non_emph_style, + minus_file: opt.minus_file.map(|s| s.clone()), minus_line_marker, - plus_line_marker, - commit_style, - file_style, - hunk_header_style, + minus_non_emph_style, + minus_style, navigate: opt.navigate, - file_modified_label: opt.file_modified_label, - file_removed_label: opt.file_removed_label, - file_added_label: opt.file_added_label, - file_renamed_label: opt.file_renamed_label, - true_color, - decorations_width, - background_color_extends_to_terminal_width, - tab_width: opt.tab_width, - syntax_set, null_style: Style::new(), null_syntect_style: SyntectStyle::default(), - max_buffered_lines: 32, paging_mode, - minus_file: opt.minus_file.map(|s| s.clone()), + plus_emph_style, plus_file: opt.plus_file.map(|s| s.clone()), + plus_line_marker, + plus_non_emph_style, + plus_style, + syntax_set, + tab_width: opt.tab_width, + theme, + theme_name, + true_color, + zero_style, } } |