Vec::new is Vec's default default

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-11-06 14:55:34 +01:00
parent 0224c3c273
commit b59c308219

View File

@ -75,8 +75,7 @@ pub struct UserWithTokens {
pub lastname: Option<String>,
#[serde(skip_serializing_if="Option::is_none")]
pub email: Option<String>,
#[serde(skip_serializing_if="Vec::is_empty")]
#[serde(default="Vec::new")]
#[serde(skip_serializing_if="Vec::is_empty", default)]
pub tokens: Vec<user::ApiToken>,
}