Skip to content

Commit d57b0c5

Browse files
author
Gunter Schmidt
committed
fix: make all values in ParamSDiff public
also add fn executable to DiffUtility
1 parent 0c019fc commit d57b0c5

2 files changed

Lines changed: 26 additions & 20 deletions

File tree

src/arg_parser.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,12 @@ pub enum DiffUtility {
671671
}
672672

673673
impl DiffUtility {
674+
/// Backward compatibility to old param.executable
675+
#[allow(unused)]
676+
pub fn executable(&self) -> OsString {
677+
self.to_os_string()
678+
}
679+
674680
#[allow(unused)]
675681
pub fn to_os_string(self) -> OsString {
676682
OsString::from(self.to_string())

src/sdiff/params_sdiff.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,45 +16,45 @@ pub struct ParamsSdiff {
1616
pub from: OsString,
1717
pub to: OsString,
1818
/// --diff-program=PROGRAM use PROGRAM to compare files
19-
diff_program: Option<String>,
19+
pub diff_program: Option<String>,
2020
/// -t, --expand-tabs expand tabs to spaces in output
21-
expand_tabs: bool,
21+
pub expand_tabs: bool,
2222
/// --help display this help and exit
23-
help: bool,
23+
pub help: bool,
2424
/// -W, --ignore-all-space ignore all white space
25-
ignore_all_space: bool,
25+
pub ignore_all_space: bool,
2626
/// -B, --ignore-blank-lines ignore changes whose lines are all blank
27-
ignore_blank_lines: bool,
27+
pub ignore_blank_lines: bool,
2828
/// -i, --ignore-case consider upper- and lower-case to be the same
29-
ignore_case: bool,
29+
pub ignore_case: bool,
3030
/// -I, --ignore-matching-lines=REGEXP ignore changes all whose lines match REGEXP
31-
ignore_matching_lines: Option<String>,
31+
pub ignore_matching_lines: Option<String>,
3232
/// -b, --ignore-space-change ignore changes in the amount of white space
33-
ignore_space_change: bool,
33+
pub ignore_space_change: bool,
3434
/// -E, --ignore-tab-expansion ignore changes due to tab expansion
35-
ignore_tab_expansion: bool,
35+
pub ignore_tab_expansion: bool,
3636
/// -Z, --ignore-trailing-space ignore white space at line end
37-
ignore_trailing_space: bool,
37+
pub ignore_trailing_space: bool,
3838
/// -l, --left-column output only the left column of common lines
39-
left_column: bool,
39+
pub left_column: bool,
4040
/// -d, --minimal try hard to find a smaller set of changes
41-
minimal: bool,
41+
pub minimal: bool,
4242
/// -o, --output=FILE operate interactively, sending output to FILE
43-
output: Option<String>,
43+
pub output: Option<String>,
4444
/// -H, --speed-large-files assume large files, many scattered small changes
45-
speed_large_files: bool,
45+
pub speed_large_files: bool,
4646
/// --strip-trailing-cr strip trailing carriage return on input
47-
strip_trailing_cr: bool,
47+
pub strip_trailing_cr: bool,
4848
/// -s, --suppress-common-lines do not output common lines
49-
suppress_common_lines: bool,
49+
pub suppress_common_lines: bool,
5050
/// --tabsize=NUM tab stops at every NUM (default 8) print columns
51-
tabsize: Option<usize>,
51+
pub tabsize: Option<usize>,
5252
/// -a, --text treat all files as text
53-
text: bool,
53+
pub text: bool,
5454
/// -v, --version output version information and exit
55-
version: bool,
55+
pub version: bool,
5656
/// -w, --width=NUM output at most NUM (default 130) print columns
57-
width: Option<usize>,
57+
pub width: Option<usize>,
5858
}
5959

6060
impl ParamsSdiff {

0 commit comments

Comments
 (0)