From 4a29ba89a92490d831f5e22121d956f6cf23d516 Mon Sep 17 00:00:00 2001 From: Rangi Date: Thu, 17 Sep 2020 15:44:45 -0400 Subject: Fix a warning from the Rust clippy linter "writing `&String` instead of `&str` involves a new object where a slice will do" --- tools/xor_compress.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, (&String, Error)> { Ok(data) } -fn write_compressed(filename: &String, data: &[u8]) -> Result { +fn write_compressed(filename: &str, data: &[u8]) -> Result { let n = data.len(); let mut output = Vec::new(); -- cgit v1.2.3