diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-01-11 16:31:10 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-01-12 11:25:51 +0100 |
commit | a8cf0c9371f7ba500cc4920889bc06d78623e980 (patch) | |
tree | e6ac140bb2b697d69417e9ff944576350671a94a /Userland/Applications/Assistant | |
parent | a15d44f019dc60b001c565ce0b940cc87024dbfd (diff) | |
download | serenity-a8cf0c9371f7ba500cc4920889bc06d78623e980.zip |
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:
Diffstat (limited to 'Userland/Applications/Assistant')
-rw-r--r-- | Userland/Applications/Assistant/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/Assistant/main.cpp b/Userland/Applications/Assistant/main.cpp index 503df2583d..4be33eaaaa 100644 --- a/Userland/Applications/Assistant/main.cpp +++ b/Userland/Applications/Assistant/main.cpp @@ -233,7 +233,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) GUI::Application::the()->quit(); }; - auto update_ui_timer = Core::Timer::create_single_shot(10, [&] { + auto update_ui_timer = TRY(Core::Timer::create_single_shot(10, [&] { results_container.remove_all_children(); results_layout.set_margins(app_state.visible_result_count ? GUI::Margins { 4, 0, 0, 0 } : GUI::Margins { 0 }); @@ -251,7 +251,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) mark_selected_item(); Core::deferred_invoke([&] { window->resize(GUI::Desktop::the().rect().width() / 3, {}); }); - }); + })); db.on_new_results = [&](auto results) { if (results.is_empty()) |