Skip to content

Commit 770b954

Browse files
Unify type meta creation for default constraint
Signed-off-by: Danil-Grigorev <[email protected]>
1 parent a2067e7 commit 770b954

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kube-core/src/metadata.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ impl TypeMeta {
2828
/// assert_eq!(type_meta.kind, "PodList");
2929
/// assert_eq!(type_meta.api_version, "v1");
3030
/// ```
31-
pub fn list<K: Resource<DynamicType = ()>>() -> Self {
31+
pub fn list<K: Resource<DynamicType = impl Default>>() -> Self {
3232
TypeMeta {
33-
api_version: K::api_version(&()).into(),
34-
kind: K::kind(&()).to_string() + "List",
33+
api_version: K::api_version(&Default::default()).into(),
34+
kind: K::kind(&Default::default()).to_string() + "List",
3535
}
3636
}
3737

0 commit comments

Comments
 (0)