refact: use clone instead to_owned
This commit is contained in:
@@ -364,7 +364,7 @@ impl Pacdef {
|
|||||||
for name in new_groups {
|
for name in new_groups {
|
||||||
ensure!(
|
ensure!(
|
||||||
*name != "." && *name != "..",
|
*name != "." && *name != "..",
|
||||||
crate::Error::InvalidGroupName(name.to_owned())
|
crate::Error::InvalidGroupName(name.clone())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ impl Group {
|
|||||||
|
|
||||||
if path.is_dir() {
|
if path.is_dir() {
|
||||||
if warn_not_symlinks && path.is_symlink() {
|
if warn_not_symlinks && path.is_symlink() {
|
||||||
symlink_dirs.push(path.to_owned());
|
symlink_dirs.push(path);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user