mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 12:44:43 +00:00
Cleanup js -> string
Converting a JS value to a string is a bit messy right now. There's duplication between string helpers in js.Local, and what js.String and js.Value provide. Now, all stringifying functions are in js.String, with some helpers in js.Value. Also tried to streamline the APIs around most common-cases (e.g. js.String -> []u8 using call_arena). js.String now also implements format, so it can be used as-is in some cases.
This commit is contained in:
@@ -140,7 +140,7 @@ fn run(
|
||||
return err;
|
||||
};
|
||||
|
||||
return value.toString(.{ .allocator = arena });
|
||||
return value.toStringSliceWithAlloc(arena);
|
||||
}
|
||||
|
||||
const Writer = struct {
|
||||
|
||||
Reference in New Issue
Block a user