Skip to content

Commit 280e167

Browse files
committed
Remove unhelpful expect() message
1 parent 2d1240e commit 280e167

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/librustdoc/clean/auto_trait.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,8 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
350350
.into_iter()
351351
.flat_map(|(ty, mut bounds)| {
352352
if let Some(data) = ty_to_fn.get(&ty) {
353-
let (poly_trait, output) = (
354-
data.0.as_ref().expect("as_ref failed").clone(),
355-
data.1.as_ref().cloned().map(Box::new),
356-
);
353+
let (poly_trait, output) =
354+
(data.0.as_ref().unwrap().clone(), data.1.as_ref().cloned().map(Box::new));
357355
let new_ty = match poly_trait.trait_ {
358356
Type::ResolvedPath { ref path, ref did, ref is_generic } => {
359357
let mut new_path = path.clone();

0 commit comments

Comments
 (0)