Improve clone efficiency
This commit is contained in:
parent
d054166fc5
commit
52a6cf3963
1 changed files with 6 additions and 6 deletions
|
|
@ -159,10 +159,10 @@ impl Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
if config.receive_directory == PathBuf::new() {
|
if config.receive_directory == PathBuf::new() {
|
||||||
config.receive_directory = config.directory.clone();
|
config.receive_directory.clone_from(&config.directory);
|
||||||
}
|
}
|
||||||
if config.send_directory == PathBuf::new() {
|
if config.send_directory == PathBuf::new() {
|
||||||
config.send_directory = config.directory.clone();
|
config.send_directory.clone_from(&config.directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(config)
|
Ok(config)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue