fix: Replace Option<Vec<T>> with Vec<T>

Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
pull/24376/head
Aakash Hemadri 2021-03-25 12:29:39 +05:30
parent f80a3ee0a6
commit be6e72bad3
No known key found for this signature in database
GPG Key ID: 16DDD8A27920964C
3 changed files with 8 additions and 8 deletions

View File

@ -35,8 +35,8 @@ pub struct Bucket {
/// Rules to expire or retain data. No rules means data never expires.
pub retention_rules: Vec<crate::models::RetentionRule>,
/// Bucket labels
#[serde(skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<crate::models::Label>>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub labels: Vec<crate::models::Label>,
}
impl Bucket {
@ -99,8 +99,8 @@ pub struct Buckets {
#[serde(skip_serializing_if = "Option::is_none")]
pub links: Option<crate::models::Links>,
/// Buckets
#[serde(skip_serializing_if = "Option::is_none")]
pub buckets: Option<Vec<crate::models::Bucket>>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub buckets: Vec<crate::models::Bucket>,
}
impl Buckets {

View File

@ -91,8 +91,8 @@ pub struct Organizations {
#[serde(skip_serializing_if = "Option::is_none")]
pub links: Option<crate::models::Links>,
/// List of organizations
#[serde(skip_serializing_if = "Option::is_none")]
pub orgs: Option<Vec<crate::models::Organization>>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub orgs: Vec<crate::models::Organization>,
}
impl Organizations {

View File

@ -63,8 +63,8 @@ pub struct Users {
#[serde(skip_serializing_if = "Option::is_none")]
pub links: Option<crate::models::UsersLinks>,
/// List of users
#[serde(skip_serializing_if = "Option::is_none")]
pub users: Option<Vec<crate::models::User>>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub users: Vec<crate::models::User>,
}
impl Users {