mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
codex: remove dead experimental helper
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -273,22 +273,6 @@ fn presence_expr_for_access(
|
||||
quote! { true }
|
||||
}
|
||||
|
||||
fn presence_expr_for_ref(access: proc_macro2::TokenStream, ty: &Type) -> proc_macro2::TokenStream {
|
||||
if let Some(inner) = option_inner(ty) {
|
||||
let inner_expr = presence_expr_for_ref(quote!(value), inner);
|
||||
return quote! {
|
||||
#access.as_ref().is_some_and(|value| #inner_expr)
|
||||
};
|
||||
}
|
||||
if is_vec_like(ty) || is_map_like(ty) {
|
||||
return quote! { !#access.is_empty() };
|
||||
}
|
||||
if is_bool(ty) {
|
||||
return quote! { *#access };
|
||||
}
|
||||
quote! { true }
|
||||
}
|
||||
|
||||
fn option_inner(ty: &Type) -> Option<&Type> {
|
||||
let Type::Path(type_path) = ty else {
|
||||
return None;
|
||||
|
||||
Reference in New Issue
Block a user