mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
pro: Convert to serenity_main(..)
This commit is contained in:
parent
74948950bb
commit
d6f1d11aa0
2 changed files with 5 additions and 3 deletions
|
@ -12,6 +12,8 @@
|
|||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <LibProtocol/Request.h>
|
||||
#include <LibProtocol/RequestClient.h>
|
||||
#include <ctype.h>
|
||||
|
@ -143,7 +145,7 @@ private:
|
|||
ByteBuffer m_buffer;
|
||||
};
|
||||
|
||||
int main(int argc, char** argv)
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
const char* url_str = nullptr;
|
||||
bool save_at_provided_name = false;
|
||||
|
@ -172,7 +174,7 @@ int main(int argc, char** argv)
|
|||
return true;
|
||||
} });
|
||||
args_parser.add_positional_argument(url_str, "URL to download from", "url");
|
||||
args_parser.parse(argc, argv);
|
||||
args_parser.parse(arguments);
|
||||
|
||||
if (data) {
|
||||
method = "POST";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue