mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
nproc: Avoid making StringView of temporary ByteBuffer
This commit is contained in:
parent
6c8eea6f5e
commit
d9c1162a20
1 changed files with 2 additions and 1 deletions
|
@ -22,7 +22,8 @@ int main()
|
||||||
return 1;
|
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();
|
auto cpuinfo_array = json.value().as_array();
|
||||||
outln("{}", cpuinfo_array.size());
|
outln("{}", cpuinfo_array.size());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue