func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { // TODO: Inefficient conversion - can we improve it? if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { return err } if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = make([]rbac.PolicyRule, len(*in)) for i := range *in { if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { return err } } } else { out.Rules = nil } return nil }
func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) return nil }