tidy: move parse_args to Args::parse
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -537,7 +537,8 @@ struct Args {
|
||||
dbpath: Option<String>,
|
||||
}
|
||||
|
||||
fn parse_args(args: &[String]) -> Args {
|
||||
impl Args {
|
||||
fn parse(args: &[String]) -> Self {
|
||||
let mut res = Args {
|
||||
timelines: vec![],
|
||||
relays: vec![],
|
||||
@@ -647,6 +648,7 @@ fn parse_args(args: &[String]) -> Args {
|
||||
}
|
||||
|
||||
res
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -676,7 +678,7 @@ impl Damus {
|
||||
args: Vec<String>,
|
||||
) -> Self {
|
||||
// arg parsing
|
||||
let parsed_args = parse_args(&args);
|
||||
let parsed_args = Args::parse(&args);
|
||||
let is_mobile = parsed_args.is_mobile.unwrap_or(ui::is_compiled_as_mobile());
|
||||
|
||||
setup_cc(cc, is_mobile, parsed_args.light);
|
||||
|
||||
Reference in New Issue
Block a user