1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

nproc: Avoid making StringView of temporary ByteBuffer

This commit is contained in:
Ben Wiederhake 2021-09-10 23:43:25 +02:00 committed by Idan Horowitz
parent 6c8eea6f5e
commit d9c1162a20
Notes: sideshowbarker 2024-07-18 04:17:33 +09:00

View file

@ -22,7 +22,8 @@ int main()
return 1;
}
auto json = JsonValue::from_string({ file->read_all() });
auto buffer = file->read_all();
auto json = JsonValue::from_string({ buffer });
auto cpuinfo_array = json.value().as_array();
outln("{}", cpuinfo_array.size());