From d1df93c933d62902ec4c72ee7c05f699edfd2b9d Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 26 Sep 2026 20:04:52 +0000 Subject: [PATCH] style: fix formatting in native_runtime Co-authored-by: Tcode-Motion <188012755+Tcode-Motion@users.noreply.github.com> --- .jules/bolt.md | 3 +++ runtime/native_runtime/src/lib.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.jules/bolt.md b/.jules/bolt.md index 386459e1..7ca76c16 100644 --- a/.jules/bolt.md +++ b/.jules/bolt.md @@ -50,3 +50,6 @@ ## 2026-09-26 - Native Runtime Stringification Optimization **Learning:** In the native runtime C FFI, generating strings for nested TsValue structures heavily penalized performance by using format! and Vec::join, creating O(N) intermediate heap allocations. **Action:** Use a recursive builder pattern by passing a mutable &mut String buffer downward and utilizing std::fmt::Write to directly push onto the buffer without intermediate allocations. +## 2024-05-24 - CI formatting issue +**Learning:** cargo fmt needs to run locally before commits to avoid CI formatting errors. +**Action:** Always include a cargo fmt --all step in execution plans before submitting. diff --git a/runtime/native_runtime/src/lib.rs b/runtime/native_runtime/src/lib.rs index 85f2fe00..759919a8 100644 --- a/runtime/native_runtime/src/lib.rs +++ b/runtime/native_runtime/src/lib.rs @@ -1,9 +1,9 @@ // runtime/native_runtime/src/lib.rs #![allow(clippy::not_unsafe_ptr_arg_deref, clippy::missing_safety_doc)] -use std::fmt::Write as FmtWrite; use std::collections::HashMap; use std::ffi::{CStr, CString}; +use std::fmt::Write as FmtWrite; use std::io::{self, Write}; use std::os::raw::{c_char, c_void};