diff options
| author | Joshua Landau <joshua@landau.ws> | 2015-06-10 17:22:20 +0100 | 
|---|---|---|
| committer | Joshua Landau <joshua@landau.ws> | 2015-06-10 21:14:03 +0100 | 
| commit | ca7418b84658fc1c723672c462aa0a7878d88b64 (patch) | |
| tree | 6fba2849520c8c205c53ca12aaa8445eb8e03ab9 /src/librustdoc/clean/inline.rs | |
| parent | d8a9570154dfbc4032cb3a6ba8b51c6256518dcd (diff) | |
| download | rust-ca7418b84658fc1c723672c462aa0a7878d88b64.tar.gz rust-ca7418b84658fc1c723672c462aa0a7878d88b64.zip | |
Removed many pointless calls to *iter() and iter_mut()
Diffstat (limited to 'src/librustdoc/clean/inline.rs')
| -rw-r--r-- | src/librustdoc/clean/inline.rs | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index cd8d7b416d2..aa364c4c746 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -83,17 +83,17 @@ fn try_inline_def(cx: &DocContext, tcx: &ty::ctxt, } def::DefStruct(did) => { record_extern_fqn(cx, did, clean::TypeStruct); - ret.extend(build_impls(cx, tcx, did).into_iter()); + ret.extend(build_impls(cx, tcx, did)); clean::StructItem(build_struct(cx, tcx, did)) } def::DefTy(did, false) => { record_extern_fqn(cx, did, clean::TypeTypedef); - ret.extend(build_impls(cx, tcx, did).into_iter()); + ret.extend(build_impls(cx, tcx, did)); build_type(cx, tcx, did) } def::DefTy(did, true) => { record_extern_fqn(cx, did, clean::TypeEnum); - ret.extend(build_impls(cx, tcx, did).into_iter()); + ret.extend(build_impls(cx, tcx, did)); build_type(cx, tcx, did) } // Assume that the enum type is reexported next to the variant, and @@ -228,7 +228,7 @@ pub fn build_impls(cx: &DocContext, tcx: &ty::ctxt, match tcx.inherent_impls.borrow().get(&did) { None => {} Some(i) => { - for &did in i.iter() { + for &did in &**i { build_impl(cx, tcx, did, &mut impls); } } @@ -451,7 +451,7 @@ fn build_module(cx: &DocContext, tcx: &ty::ctxt, decoder::DlDef(def) if vis == ast::Public => { if !visited.insert(def) { return } match try_inline_def(cx, tcx, def) { - Some(i) => items.extend(i.into_iter()), + Some(i) => items.extend(i), None => {} } } | 
