Skip to content

Commit

Permalink
improve the variable name
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Hofstetter <[email protected]>
  • Loading branch information
sylvestre and cakebaker authored Jan 25, 2024
1 parent f8a0be0 commit 378aeaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/uu/hashsum/src/hashsum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,12 +791,12 @@ where
}

fn unescape_filename(filename: &str) -> (String, &'static str) {
let escaped = filename
let unescaped = filename
.replace("\\\\", "\\")
.replace("\\n", "\n")
.replace("\\r", "\r");
let prefix = if escaped == filename { "" } else { "\\" };
(escaped, prefix)
let prefix = if unescaped == filename { "" } else { "\\" };
(unescaped, prefix)
}

fn escape_filename(filename: &Path) -> (String, &'static str) {
Expand Down

0 comments on commit 378aeaf

Please sign in to comment.