Skip to content

Commit 4fa0b39

Browse files
Merge pull request #46 from source-foundry/fix-branch-assignment
Clippy: fix unnecessary late assignment
2 parents ef5053e + 670ce72 commit 4fa0b39

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lib/formatters.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ pub(crate) fn format_ufo(
2020
return Err(Error::InvalidPath(ufopath.into()));
2121
}
2222
// define out directory path based on optional user-specified command line options
23-
let outpath;
24-
if unique_filename.is_some() || unique_extension.is_some() {
25-
outpath = utils::get_ufo_outpath(ufopath, unique_filename, unique_extension);
23+
let outpath: PathBuf = if unique_filename.is_some() || unique_extension.is_some() {
24+
utils::get_ufo_outpath(ufopath, unique_filename, unique_extension)
2625
} else {
2726
// if the user did not specify options for custom file name or custom
2827
// extension, then write in place over the in path
29-
outpath = ufopath.to_path_buf();
30-
}
28+
ufopath.to_path_buf()
29+
};
3130

3231
// define the indentation spacing format based on user CL options
3332
let indentation_str = get_indent_str(indent_with_space, indent_number);

0 commit comments

Comments
 (0)