diff --git a/ofborg/src/outpathdiff.rs b/ofborg/src/outpathdiff.rs index 2e34a05..eee5a55 100644 --- a/ofborg/src/outpathdiff.rs +++ b/ofborg/src/outpathdiff.rs @@ -145,7 +145,7 @@ impl OutPaths { fn place_nix(&self) { let mut file = File::create(self.nix_path()).expect("Failed to create nix out path check"); - file.write_all(include_str!("outpaths.nix").as_bytes()) + file.write_all(include_bytes!("outpaths.nix")) .expect("Failed to place outpaths.nix"); } diff --git a/ofborg/src/tasks/statscollector.rs b/ofborg/src/tasks/statscollector.rs index e7bdc9a..48489e7 100644 --- a/ofborg/src/tasks/statscollector.rs +++ b/ofborg/src/tasks/statscollector.rs @@ -32,9 +32,9 @@ impl worker::SimpleWorker for StatCollectorWorker match serde_json::from_slice(body) { Ok(e) => Ok(e), Err(_) => { - let mut modified_body: Vec = vec!["\"".as_bytes()[0]]; + let mut modified_body: Vec = vec![b"\""[0]]; modified_body.append(&mut body.to_vec()); - modified_body.push("\"".as_bytes()[0]); + modified_body.push(b"\""[0]); match serde_json::from_slice(&modified_body) { Ok(e) => { diff --git a/ofborg/src/writetoline.rs b/ofborg/src/writetoline.rs index 37db1f4..ace5829 100644 --- a/ofborg/src/writetoline.rs +++ b/ofborg/src/writetoline.rs @@ -54,7 +54,7 @@ impl LineWriter { self.file .write_all(self.buffer.join("\n").as_bytes()) .unwrap(); - self.file.write("\n".as_bytes()).unwrap(); + self.file.write(b"\n").unwrap(); } else { // println!("taking the append option"); // println!("Writing {:?} to line {}", data, line); @@ -70,7 +70,7 @@ impl LineWriter { // end // println!("selected buffer: {:?}", to_write); self.file.write(to_write.as_bytes()).unwrap(); - self.file.write("\n".as_bytes()).unwrap(); + self.file.write(b"\n").unwrap(); } self.last_line = line;