1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:28:13 +00:00

LibCore: Do not return an Optional from Resource:::filesystem_path

This API never returns OptionalNone, and all callers already assume as
much.
This commit is contained in:
Timothy Flynn 2023-11-05 08:05:22 -05:00 committed by Andreas Kling
parent 2a1fc96650
commit 98a82565cd
6 changed files with 16 additions and 9 deletions

View file

@ -53,7 +53,7 @@ ErrorOr<NonnullRefPtr<Resource>> Resource::load_from_uri(StringView uri)
return MUST(String::formatted("{}://{}", m_scheme == Scheme::Resource ? "resource"sv : "file"sv, m_path));
}
[[nodiscard]] Optional<String> Resource::filesystem_path() const
[[nodiscard]] String Resource::filesystem_path() const
{
return ResourceImplementation::the().filesystem_path(*this);
}
@ -97,4 +97,5 @@ ErrorOr<NonnullRefPtr<Resource>> Resource::load_from_uri(StringView uri)
{
return FixedMemoryStream(data());
}
}