diff options
| -rw-r--r-- | patio-to-cranelift/src/codegen/values.rs | 4 |
1 files changed, 1 insertions, 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 } => { |
