Skip to content

Commit

Permalink
Unify type meta creation for default constraint
Browse files Browse the repository at this point in the history
Signed-off-by: Danil-Grigorev <[email protected]>
  • Loading branch information
Danil-Grigorev committed Oct 15, 2024
1 parent e099459 commit d8c68fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kube-core/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ impl TypeMeta {
/// assert_eq!(type_meta.kind, "PodList");
/// assert_eq!(type_meta.api_version, "v1");
/// ```
pub fn list<K: Resource<DynamicType = ()>>() -> Self {
pub fn list<K: Resource<DynamicType = impl Default>>() -> Self {

Check warning on line 31 in kube-core/src/metadata.rs

View check run for this annotation

Codecov / codecov/patch

kube-core/src/metadata.rs#L31

Added line #L31 was not covered by tests
TypeMeta {
api_version: K::api_version(&()).into(),
kind: K::kind(&()).to_string() + "List",
api_version: K::api_version(&Default::default()).into(),
kind: K::kind(&Default::default()).to_string() + "List",

Check warning on line 34 in kube-core/src/metadata.rs

View check run for this annotation

Codecov / codecov/patch

kube-core/src/metadata.rs#L33-L34

Added lines #L33 - L34 were not covered by tests
}
}

Expand Down

0 comments on commit d8c68fd

Please sign in to comment.