Fix crash when loading if the installer was updated from an older version

This commit is contained in:
James Rowe 2019-11-07 10:56:50 -07:00
parent 1639e74b98
commit 6845ed9ad7

View file

@ -54,7 +54,7 @@ pub enum InstallMessage {
EOF, EOF,
} }
#[derive(Serialize, Deserialize, Clone)] #[derive(Serialize, Deserialize, Default, Clone)]
pub struct Credentials { pub struct Credentials {
#[serde(default)] #[serde(default)]
pub username: String, pub username: String,
@ -67,6 +67,7 @@ pub struct Credentials {
pub struct InstallationDatabase { pub struct InstallationDatabase {
pub packages: Vec<LocalInstallation>, pub packages: Vec<LocalInstallation>,
pub shortcuts: Vec<String>, pub shortcuts: Vec<String>,
#[serde(default)]
pub credentials: Credentials, pub credentials: Credentials,
} }