Skip to content

Commit 7a259a0

Browse files
committed
less import lines
1 parent ce61e71 commit 7a259a0

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

kube-core/src/crd.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,31 @@ use k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions as apiexts;
44

55
/// Types for v1 CustomResourceDefinitions
66
pub mod v1 {
7-
use super::apiexts;
8-
use crate::discovery::ApiResource;
97
/// Extension trait that will be implemented by kube-derive
108
///
119
/// This trait variant is implemented by default (or when `#[kube(apiextensions = "v1")]`)
1210
pub trait CustomResourceExt {
1311
/// Helper to generate the CRD including the JsonSchema
1412
///
1513
/// This is using the stable v1::CustomResourceDefinitions (present in kubernetes >= 1.16)
16-
fn crd() -> apiexts::v1::CustomResourceDefinition;
14+
fn crd() -> super::apiexts::v1::CustomResourceDefinition;
1715
/// Helper to generate the api information type for use with the dynamic `Api`
18-
fn api_resource() -> ApiResource;
16+
fn api_resource() -> crate::discovery::ApiResource;
1917
}
2018
}
2119

2220
/// Types for legacy v1beta1 CustomResourceDefinitions
2321
pub mod v1beta1 {
24-
use super::apiexts;
25-
use crate::discovery::ApiResource;
2622
/// Extension trait that will be implemented by kube-derive for legacy v1beta1::CustomResourceDefinitions
2723
///
2824
/// This trait variant is only implemented with `#[kube(apiextensions = "v1beta1")]`
2925
pub trait CustomResourceExt {
3026
/// Helper to generate the legacy CRD without a JsonSchema
3127
///
3228
/// This is using v1beta1::CustomResourceDefinitions (which will be removed in kubernetes 1.22)
33-
fn crd() -> apiexts::v1beta1::CustomResourceDefinition;
29+
fn crd() -> super::apiexts::v1beta1::CustomResourceDefinition;
3430
/// Helper to generate the api information type for use with the dynamic `Api`
35-
fn api_resource() -> ApiResource;
31+
fn api_resource() -> crate::discovery::ApiResource;
3632
}
3733
}
3834

0 commit comments

Comments
 (0)