From: Nicolas Patry Date: Thu, 22 Sep 2022 15:32:13 +0000 (+0200) Subject: Clippy pass. X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=692d15ca19ce2b4b03808f34c00f5c1388eff7be;p=safetensors.git Clippy pass. --- diff --git a/safetensors/src/lib.rs b/safetensors/src/lib.rs index e0c6067..563181c 100644 --- a/safetensors/src/lib.rs +++ b/safetensors/src/lib.rs @@ -66,7 +66,7 @@ pub fn serialize_to_file( let metadata_buf = serde_json::to_string(&metadata).unwrap().into_bytes(); let n: u64 = metadata_buf.len() as u64; let mut f = BufWriter::new(File::create(filename)?); - f.write_all(&n.to_le_bytes().to_vec())?; + f.write_all(n.to_le_bytes().as_ref())?; f.write_all(&metadata_buf)?; for tensor in tensors { f.write_all(tensor.data)?;