diff options
| author | Noah Lev <camelidcamel@gmail.com> | 2021-08-31 18:10:57 -0700 |
|---|---|---|
| committer | Noah Lev <camelidcamel@gmail.com> | 2021-08-31 20:32:19 -0700 |
| commit | 280e16787e6a9bd769754f29c37c045bc18016f4 (patch) | |
| tree | c6921a2eddd63c5b9ab9a3a8dfac0bc477c568e6 | |
| parent | 2d1240e6f7709d06caddc396f689ba0bc77f80a3 (diff) | |
| download | rust-280e16787e6a9bd769754f29c37c045bc18016f4.tar.gz rust-280e16787e6a9bd769754f29c37c045bc18016f4.zip | |
Remove unhelpful `expect()` message
| -rw-r--r-- | src/librustdoc/clean/auto_trait.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/librustdoc/clean/auto_trait.rs b/src/librustdoc/clean/auto_trait.rs index f98059b1a74..9217209fcf0 100644 --- a/src/librustdoc/clean/auto_trait.rs +++ b/src/librustdoc/clean/auto_trait.rs @@ -350,10 +350,8 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> { .into_iter() .flat_map(|(ty, mut bounds)| { if let Some(data) = ty_to_fn.get(&ty) { - let (poly_trait, output) = ( - data.0.as_ref().expect("as_ref failed").clone(), - data.1.as_ref().cloned().map(Box::new), - ); + let (poly_trait, output) = + (data.0.as_ref().unwrap().clone(), data.1.as_ref().cloned().map(Box::new)); let new_ty = match poly_trait.trait_ { Type::ResolvedPath { ref path, ref did, ref is_generic } => { let mut new_path = path.clone(); |
