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.
pub fn option_or_result_arg_ty<'tcx>(
cx: &LateContext<'tcx>,
ty: Ty<'tcx>,
) -> Option<Ty<'tcx>>Check if ty is an Option<T> or a Result<T, E> and return its argument type (T) if it is.