LibCore+Userland: Make Core::Timer::create_single_shot() return ErrorOr

clang-format sure has some interesting opinions about where to put a
method call that comes after a lambda. :thonk:
This commit is contained in:
Sam Atkins
2023-01-11 16:31:10 +00:00
committed by Andreas Kling
parent a15d44f019
commit a8cf0c9371
20 changed files with 42 additions and 36 deletions

View File

@@ -12,10 +12,10 @@
TEST_CASE(deferred_invoke)
{
Core::EventLoop event_loop;
auto reaper = Core::Timer::create_single_shot(250, [] {
auto reaper = MUST(Core::Timer::create_single_shot(250, [] {
warnln("I waited for the deferred_invoke to happen, but it never did!");
VERIFY_NOT_REACHED();
});
}));
Core::deferred_invoke([&event_loop] {
event_loop.quit(0);