update: config build refactor
This commit is contained in:
parent
9f03987285
commit
2e7bfcbfc6
@ -50,12 +50,11 @@ pub struct Flags {
|
|||||||
|
|
||||||
impl Context {
|
impl Context {
|
||||||
pub async fn new<'a>() -> Self {
|
pub async fn new<'a>() -> Self {
|
||||||
let argp = Context::argparse();
|
|
||||||
// Get flags
|
// Get flags
|
||||||
let debug: bool = argp.contains_id("debug");
|
let argp: ArgMatches = Context::argparse();
|
||||||
|
//let debug: bool = argp.contains_id("debug");
|
||||||
|
let debug: bool = argp.get_one::<bool>("debug").unwrap().to_owned();
|
||||||
let server: String = argp.get_one::<String>("server").unwrap().to_string();
|
let server: String = argp.get_one::<String>("server").unwrap().to_string();
|
||||||
//.unwrap_or(format!("https://{}", MASTERSERVER).as_str())
|
|
||||||
//.to_string();
|
|
||||||
|
|
||||||
// Build context
|
// Build context
|
||||||
let mut ctx = Context {
|
let mut ctx = Context {
|
||||||
|
Loading…
Reference in New Issue
Block a user