Skip to main content

option_or_result_arg_ty

Function option_or_result_arg_ty 

Source
pub fn option_or_result_arg_ty<'tcx>(
    cx: &LateContext<'tcx>,
    ty: Ty<'tcx>,
) -> Option<Ty<'tcx>>
Expand description

Check if ty is an Option<T> or a Result<T, E> and return its argument type (T) if it is.