Derive Default for Config
This commit is contained in:
parent
243063826f
commit
6576e2f3f9
1 changed files with 1 additions and 12 deletions
|
@ -127,7 +127,7 @@ struct NoteUpdate {
|
||||||
content: String,
|
content: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize, Default)]
|
||||||
struct Config {
|
struct Config {
|
||||||
user: String,
|
user: String,
|
||||||
pswd: String,
|
pswd: String,
|
||||||
|
@ -135,17 +135,6 @@ struct Config {
|
||||||
server_url: String,
|
server_url: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Config {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self {
|
|
||||||
user: "".to_string(),
|
|
||||||
pswd: "".to_string(),
|
|
||||||
note_id: "".to_string(),
|
|
||||||
server_url: "".to_string(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
#[command(author, version, about, long_about=None)]
|
#[command(author, version, about, long_about=None)]
|
||||||
struct CliArgs {
|
struct CliArgs {
|
||||||
|
|
Loading…
Reference in a new issue