From 9ee6cccd2aa1be75a1c6bccf2b219cd8dbd3984b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 5 Apr 2026 22:10:24 +0100 Subject: Remove unnecessary use of write trait --- patio-to-cranelift/src/codegen/values.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/patio-to-cranelift/src/codegen/values.rs b/patio-to-cranelift/src/codegen/values.rs index 80212932..825292e6 100644 --- a/patio-to-cranelift/src/codegen/values.rs +++ b/patio-to-cranelift/src/codegen/values.rs @@ -1,5 +1,3 @@ -use std::io::Write; - use crate::{ codegen::types, patio::values::{PatioDataValue, PatioIntValue}, @@ -38,7 +36,7 @@ fn write_data_value( PatioDataValue::Int(int_value) => { // TODO: handle 32-bit int let value: i64 = eval_int_value(int_value, target_triple).into(); - bytes.write_all(&value.to_le_bytes()).unwrap(); + bytes.extend_from_slice(&value.to_le_bytes()); } PatioDataValue::Int32(_) => todo!(), PatioDataValue::Struct { elements } => { -- cgit v1.2.3