From c228fb6261b6dc5b613b76d8e092263d30eb025c Mon Sep 17 00:00:00 2001
From: clux <sszynrae@gmail.com>
Date: Wed, 1 Mar 2023 06:19:56 +0000
Subject: [PATCH] simplify trait bound to just the empty dyn type

avoids unstable associated trait bounds + lints showing that the default really had to be the empty type.

Signed-off-by: clux <sszynrae@gmail.com>
---
 kube-core/src/metadata.rs | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/kube-core/src/metadata.rs b/kube-core/src/metadata.rs
index 577320cd3..01ee42cb7 100644
--- a/kube-core/src/metadata.rs
+++ b/kube-core/src/metadata.rs
@@ -54,19 +54,15 @@ pub trait PartialObjectMetaExt: private::Sealed {
     /// because it contains erased `TypeMeta` (and the apiserver is doing the erasing).
     ///
     /// This method is useful when unit testing local behaviour.
-    fn into_response_partial<K: Resource>(self) -> PartialObjectMeta<K>;
+    fn into_response_partial<K>(self) -> PartialObjectMeta<K>;
 }
 
 impl PartialObjectMetaExt for ObjectMeta {
-    fn into_request_partial<K: Resource<DynamicType = ()>>(self) -> PartialObjectMeta<K>
-    where
-        K::DynamicType: Default,
-    {
-        let dyntype: K::DynamicType = Default::default();
+    fn into_request_partial<K: Resource<DynamicType = ()>>(self) -> PartialObjectMeta<K> {
         PartialObjectMeta {
             types: Some(TypeMeta {
-                api_version: K::api_version(&dyntype).into(),
-                kind: K::kind(&dyntype).into(),
+                api_version: K::api_version(&()).into(),
+                kind: K::kind(&()).into(),
             }),
             metadata: self,
             _phantom: PhantomData,