aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-04-05 22:10:24 +0100
committerMichael Williamson <mike@zwobble.org>2026-04-05 22:10:24 +0100
commit9ee6cccd2aa1be75a1c6bccf2b219cd8dbd3984b (patch)
treef5522ef9ebc77c06228b0ee71ec459c90851481c
parent14487bcfb4806aa26105619764c68f4b27683729 (diff)
Remove unnecessary use of write trait
-rw-r--r--patio-to-cranelift/src/codegen/values.rs4
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 } => {