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>,
|
dbpath: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_args(args: &[String]) -> Args {
|
impl Args {
|
||||||
|
fn parse(args: &[String]) -> Self {
|
||||||
let mut res = Args {
|
let mut res = Args {
|
||||||
timelines: vec![],
|
timelines: vec![],
|
||||||
relays: vec![],
|
relays: vec![],
|
||||||
@@ -648,6 +649,7 @@ fn parse_args(args: &[String]) -> Args {
|
|||||||
|
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
fn determine_key_storage_type() -> KeyStorageType {
|
fn determine_key_storage_type() -> KeyStorageType {
|
||||||
@@ -676,7 +678,7 @@ impl Damus {
|
|||||||
args: Vec<String>,
|
args: Vec<String>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
// arg parsing
|
// 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());
|
let is_mobile = parsed_args.is_mobile.unwrap_or(ui::is_compiled_as_mobile());
|
||||||
|
|
||||||
setup_cc(cc, is_mobile, parsed_args.light);
|
setup_cc(cc, is_mobile, parsed_args.light);
|
||||||
|
|||||||
Reference in New Issue
Block a user