mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 21:35:06 +00:00
Everywhere: Remove needless copies of Error / ErrorOr instances
Either take the underlying objects with release_* methods or move() the instances around.
This commit is contained in:
parent
52687814ea
commit
4a916cd379
28 changed files with 69 additions and 77 deletions
|
@ -1021,8 +1021,8 @@ ErrorOr<NonnullRefPtr<GUI::Action>> HackStudioWidget::create_debug_action()
|
|||
return;
|
||||
}
|
||||
|
||||
Debugger::the().set_child_setup_callback([this, ptm_res]() {
|
||||
return m_terminal_wrapper->setup_slave_pseudoterminal(ptm_res.value());
|
||||
Debugger::the().set_child_setup_callback([this, ptm_res = ptm_res.release_value()]() {
|
||||
return m_terminal_wrapper->setup_slave_pseudoterminal(ptm_res);
|
||||
});
|
||||
|
||||
m_debugger_thread = Threading::Thread::construct(Debugger::start_static);
|
||||
|
@ -1789,7 +1789,7 @@ ErrorOr<NonnullRefPtr<GUI::Action>> HackStudioWidget::create_open_project_config
|
|||
|
||||
auto maybe_error = Core::System::mkdir(LexicalPath::absolute_path(m_project->root_path(), parent_directory), 0755);
|
||||
if (maybe_error.is_error() && maybe_error.error().code() != EEXIST)
|
||||
return maybe_error.error();
|
||||
return maybe_error.release_error();
|
||||
|
||||
auto file = TRY(Core::Stream::File::open(absolute_config_file_path, Core::Stream::OpenMode::Write));
|
||||
TRY(file->write_entire_buffer(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue