diff --git a/src/command_install.rs b/src/command_install.rs index 980d7ed..c2705af 100644 --- a/src/command_install.rs +++ b/src/command_install.rs @@ -216,7 +216,6 @@ pub async fn install( .map(|s| s.trim_start().to_owned()) .collect::>() .join("\n") - .as_str() .as_bytes(), )?; formula_file.write_all(package_formula.get_file_content().as_bytes())?; diff --git a/src/symlink.rs b/src/symlink.rs index 2e3425b..dc0d015 100644 --- a/src/symlink.rs +++ b/src/symlink.rs @@ -48,7 +48,7 @@ pub fn symlink(src: &Path, dest: &Path, package_name: &str) -> Result<(), Report .replace("{filepath}", &src_file_path) .replace("{package}", package_name); - bat_file.write_all(bat_script.as_str().as_bytes())?; + bat_file.write_all(bat_script.as_bytes())?; } // generate a shell @@ -64,7 +64,7 @@ pub fn symlink(src: &Path, dest: &Path, package_name: &str) -> Result<(), Report .replace("{package}", package_name) .replace("\r\n", "\n"); - shell_file.write_all(bat_script.as_str().as_bytes())?; + shell_file.write_all(bat_script.as_bytes())?; } }