Skip to content

Commit

Permalink
Clarify field that is a path description, not a path
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Dec 30, 2023
1 parent 5d2a477 commit b71c553
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ fn main() {
lhs_path,
rhs_path,
display_path,
old_path,
renamed,
} => {
if lhs_path == rhs_path {
let is_dir = match &lhs_path {
Expand Down Expand Up @@ -297,7 +297,7 @@ fn main() {
_ => {
let diff_result = diff_file(
&display_path,
old_path,
renamed,
&lhs_path,
&rhs_path,
&display_options,
Expand Down
8 changes: 4 additions & 4 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ pub(crate) enum Mode {
rhs_path: FileArgument,
/// The path that we show to the user.
display_path: String,
/// If this file has been renamed, the name it had previously.
old_path: Option<String>,
/// If this file has been renamed, a description of the change.
renamed: Option<String>,
},
DiffFromConflicts {
diff_options: DiffOptions,
Expand Down Expand Up @@ -635,7 +635,7 @@ pub(crate) fn parse_args() -> Mode {
info!("CLI arguments: {:?}", args);

// TODO: document these different ways of calling difftastic.
let (display_path, lhs_path, rhs_path, old_path) = match &args[..] {
let (display_path, lhs_path, rhs_path, renamed) = match &args[..] {
[lhs_path, rhs_path] => {
let lhs_arg = FileArgument::from_cli_argument(lhs_path);
let rhs_arg = FileArgument::from_cli_argument(rhs_path);
Expand Down Expand Up @@ -725,7 +725,7 @@ pub(crate) fn parse_args() -> Mode {
lhs_path,
rhs_path,
display_path,
old_path,
renamed,
}
}

Expand Down

0 comments on commit b71c553

Please sign in to comment.