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:
parent
2a1fc96650
commit
98a82565cd
6 changed files with 16 additions and 9 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue