Просмотр исходного кода

cli: Remove spurious clone from spawn_config()

parazyd 4 лет назад
Родитель
Сommit
2c3a4073ee
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/cli/cli_config.rs

+ 1 - 1
src/cli/cli_config.rs

@@ -145,7 +145,7 @@ pub fn spawn_config(path: &Path, contents: &[u8]) -> Result<()> {
             fs::create_dir_all(parent)?;
             fs::create_dir_all(parent)?;
         }
         }
 
 
-        let mut file = fs::File::create(path.clone())?;
+        let mut file = fs::File::create(path)?;
         file.write_all(contents)?;
         file.write_all(contents)?;
         println!("Config file created in `{:?}`. Please review it and try again.", path);
         println!("Config file created in `{:?}`. Please review it and try again.", path);
         std::process::exit(2);
         std::process::exit(2);