Skip to content

Commit 2c415ba

Browse files
committed
Refactoring
1 parent 744deed commit 2c415ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cli.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub struct DownloadArgs {
7272
long,
7373
help = "Rename the file to be downloaded",
7474
value_name = "FILE",
75-
value_parser = check_file_name
75+
value_parser = validate_file_name
7676
)]
7777
pub rename: Option<String>,
7878

@@ -151,7 +151,7 @@ fn validate_output_target(target: &str) -> Result<PathBuf, String> {
151151
}
152152

153153
/// Helper function to validate the option [-r, -rename] of the download command
154-
fn check_file_name(filename: &str) -> Result<String, String> {
154+
fn validate_file_name(filename: &str) -> Result<String, String> {
155155
// we can use safely `unwrap` because the os type was checked before parsing the cli arguments
156156
let os_type = os_specifics::get_os().unwrap();
157157
match filename_handling::validate_filename(&os_type, filename) {

0 commit comments

Comments
 (0)