summaryrefslogtreecommitdiff
path: root/Userland/DevTools
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-12-11 17:49:00 +0100
committerAndreas Kling <kling@serenityos.org>2022-12-12 14:16:42 +0100
commited4c2f2f8ea59295edceca77bf308df5de6872d6 (patch)
treec28004c0fcfe0146d40549c74ec256eb50f3eb44 /Userland/DevTools
parent5061a905ff561743c7de9c7a413845b714ab4ee2 (diff)
downloadserenity-ed4c2f2f8ea59295edceca77bf308df5de6872d6.zip
LibCore: Rename `Stream::read_all` to `read_until_eof`
This generally seems like a better name, especially if we somehow also need a better name for "read the entire buffer, but not the entire file" somewhere down the line.
Diffstat (limited to 'Userland/DevTools')
-rw-r--r--Userland/DevTools/Profiler/Profile.cpp2
-rw-r--r--Userland/DevTools/SQLStudio/ScriptEditor.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/DevTools/Profiler/Profile.cpp b/Userland/DevTools/Profiler/Profile.cpp
index 656f159ae6..d7f4418b9e 100644
--- a/Userland/DevTools/Profiler/Profile.cpp
+++ b/Userland/DevTools/Profiler/Profile.cpp
@@ -238,7 +238,7 @@ ErrorOr<NonnullOwnPtr<Profile>> Profile::load_from_perfcore_file(StringView path
{
auto file = TRY(Core::Stream::File::open(path, Core::Stream::OpenMode::Read));
- auto json = JsonValue::from_string(TRY(file->read_all()));
+ auto json = JsonValue::from_string(TRY(file->read_until_eof()));
if (json.is_error() || !json.value().is_object())
return Error::from_string_literal("Invalid perfcore format (not a JSON object)");
diff --git a/Userland/DevTools/SQLStudio/ScriptEditor.cpp b/Userland/DevTools/SQLStudio/ScriptEditor.cpp
index 4cf7cd3fa6..539e979e9c 100644
--- a/Userland/DevTools/SQLStudio/ScriptEditor.cpp
+++ b/Userland/DevTools/SQLStudio/ScriptEditor.cpp
@@ -29,7 +29,7 @@ void ScriptEditor::new_script_with_temp_name(DeprecatedString name)
ErrorOr<void> ScriptEditor::open_script_from_file(LexicalPath const& file_path)
{
auto file = TRY(Core::Stream::File::open(file_path.string(), Core::Stream::OpenMode::Read));
- auto buffer = TRY(file->read_all());
+ auto buffer = TRY(file->read_until_eof());
set_text({ buffer.bytes() });
m_path = file_path.string();