diff --git a/raiden-derive/src/ops/shared.rs b/raiden-derive/src/ops/shared.rs index 015034e6..dce4da44 100644 --- a/raiden-derive/src/ops/shared.rs +++ b/raiden-derive/src/ops/shared.rs @@ -41,12 +41,12 @@ pub(crate) fn expand_attr_to_item( #ident: { #item if item.is_none() { - #ty::default() + Default::default() } else { let item = item.unwrap(); // If null is true, use default value. if let Some(true) = item.null { - #ty::default() + Default::default() } else { let converted = ::raiden::FromAttribute::from_attr(Some(item)); if converted.is_err() { diff --git a/raiden/tests/all/get.rs b/raiden/tests/all/get.rs index 9b22732a..10e6ec34 100644 --- a/raiden/tests/all/get.rs +++ b/raiden/tests/all/get.rs @@ -394,6 +394,8 @@ mod tests { id: String, #[raiden(use_default)] flag: bool, + #[raiden(use_default)] + type_param: std::collections::BTreeSet, } #[tokio::test] @@ -410,6 +412,7 @@ mod tests { item: UseDefaultForNull { id: "id0".to_owned(), flag: false, + type_param: Default::default(), }, consumed_capacity: None, }