Refactor encoding logic in ChangeBatcher for improved readability and consistency

- Simplified the `isReadable` condition in `encodeService.lua` for better clarity.
- Updated float formatting functions in `json.rs` to enhance precision and consistency in numeric representation.
- Refactored handling of `AmbiguousValue` in `resolution.rs` to eliminate unnecessary type casting, improving data integrity.
- Cleaned up formatting in `serve.rs` and test files for better code readability.

These changes enhance the clarity and efficiency of the encoding and serialization processes, contributing to overall performance improvements.
This commit is contained in:
Joe 2026-02-18 09:47:50 -06:00
parent 3c026aea40
commit 0450dabfce
6 changed files with 47 additions and 51 deletions

View file

@ -606,10 +606,7 @@ pub fn build_syncback_request(
/// Build a complete rbxl file from the single-rbxm data blob + service
/// chunks, mirroring the same data that live syncback receives.
pub fn make_rbxl_from_chunks(
data: &[u8],
chunks: &[librojo::web_api::ServiceChunk],
) -> Vec<u8> {
pub fn make_rbxl_from_chunks(data: &[u8], chunks: &[librojo::web_api::ServiceChunk]) -> Vec<u8> {
use rbx_dom_weak::types::Variant;
use rbx_dom_weak::WeakDom;
use std::collections::HashMap;