File tree 2 files changed +6
-6
lines changed 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ pub mod v1 {
14
14
fn crd ( ) -> super :: apiexts:: v1:: CustomResourceDefinition ;
15
15
/// Helper to return the name of this `CustomResourceDefinition` in kubernetes.
16
16
///
17
- /// This is not the name of an _instance_ of this custom resource but the definition itself.
18
- fn crd_name ( ) -> String ;
17
+ /// This is not the name of an _instance_ of this custom resource but the `CustomResourceDefinition` object itself.
18
+ fn crd_name ( ) -> & ' static str ;
19
19
/// Helper to generate the api information type for use with the dynamic `Api`
20
20
fn api_resource ( ) -> crate :: discovery:: ApiResource ;
21
21
}
@@ -33,8 +33,8 @@ pub mod v1beta1 {
33
33
fn crd ( ) -> super :: apiexts:: v1beta1:: CustomResourceDefinition ;
34
34
/// Helper to return the name of this `CustomResourceDefinition` in kubernetes.
35
35
///
36
- /// This is not the name of an _instance_ of this custom resource but the definition itself.
37
- fn crd_name ( ) -> String ;
36
+ /// This is not the name of an _instance_ of this custom resource but the `CustomResourceDefinition` object itself.
37
+ fn crd_name ( ) -> & ' static str ;
38
38
/// Helper to generate the api information type for use with the dynamic `Api`
39
39
fn api_resource ( ) -> crate :: discovery:: ApiResource ;
40
40
}
Original file line number Diff line number Diff line change @@ -368,8 +368,8 @@ pub(crate) fn derive(input: proc_macro2::TokenStream) -> proc_macro2::TokenStrea
368
368
. expect( "valid custom resource from #[kube(attrs..)]" )
369
369
}
370
370
371
- fn crd_name( ) -> String {
372
- #crd_meta_name. to_string ( )
371
+ fn crd_name( ) -> & ' static str {
372
+ #crd_meta_name
373
373
}
374
374
375
375
fn api_resource( ) -> kube:: core:: ApiResource {
You can’t perform that action at this time.
0 commit comments