summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-09-17 15:44:45 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-09-17 15:44:45 -0400
commit4a29ba89a92490d831f5e22121d956f6cf23d516 (patch)
treef836459c03c0c544f535207324a9c9e2c823a6a6
parenta46a02097a0a00081dc2173aeb6bf3ca1187a868 (diff)
Fix a warning from the Rust clippy linter
"writing `&String` instead of `&str` involves a new object where a slice will do"
-rw-r--r--tools/xor_compress.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/xor_compress.rs b/tools/xor_compress.rs
index fd6c674..673b4a3 100644
--- a/tools/xor_compress.rs
+++ b/tools/xor_compress.rs
@@ -19,7 +19,7 @@ fn read_files(filenames: &[String]) -> Result<Vec<u8>, (&String, Error)> {
Ok(data)
}
-fn write_compressed(filename: &String, data: &[u8]) -> Result<u32, Error> {
+fn write_compressed(filename: &str, data: &[u8]) -> Result<u32, Error> {
let n = data.len();
let mut output = Vec::new();