cp: rename function

is_forbidden_copy_to_same_file -> is_forbidden_to_copy_to_same_file
This commit is contained in:
Daniel Hofstetter 2023-12-31 14:17:16 +01:00
parent 2c42623b6e
commit 902a128ea8

View file

@ -1509,7 +1509,7 @@ fn backup_dest(dest: &Path, backup_path: &Path) -> CopyResult<PathBuf> {
///
/// Copying to the same file is only allowed if both `--backup` and
/// `--force` are specified and the file is a regular file.
fn is_forbidden_copy_to_same_file(
fn is_forbidden_to_copy_to_same_file(
source: &Path,
dest: &Path,
options: &Options,
@ -1533,7 +1533,7 @@ fn handle_existing_dest(
) -> CopyResult<()> {
// Disallow copying a file to itself, unless `--force` and
// `--backup` are both specified.
if is_forbidden_copy_to_same_file(source, dest, options, source_in_command_line) {
if is_forbidden_to_copy_to_same_file(source, dest, options, source_in_command_line) {
return Err(format!("{} and {} are the same file", source.quote(), dest.quote()).into());
}