diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-12-30 10:51:18 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-12-30 17:06:08 -0800 |
| commit | 6abfac083feafc73e5d736177755cce3bfb7153f (patch) | |
| tree | d5502fab0dd68ea96057616eb20d90a2c9050218 /src/librustdoc/html/render.rs | |
| parent | 6e1879eaf1cb5e727eb134a3e27018f7535852eb (diff) | |
| download | rust-6abfac083feafc73e5d736177755cce3bfb7153f.tar.gz rust-6abfac083feafc73e5d736177755cce3bfb7153f.zip | |
Fallout from stabilization
Diffstat (limited to 'src/librustdoc/html/render.rs')
| -rw-r--r-- | src/librustdoc/html/render.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index bfb03cb2589..f8a0b88b408 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1799,7 +1799,7 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item, try!(write!(w, r#"<script type="text/javascript" async src="{root_path}/implementors/{path}/{ty}.{name}.js"> </script>"#, - root_path = Vec::from_elem(cx.current.len(), "..").connect("/"), + root_path = repeat("..").take(cx.current.len()).collect::<Vec<_>>().connect("/"), path = if ast_util::is_local(it.def_id) { cx.current.connect("/") } else { @@ -2055,7 +2055,8 @@ fn render_struct(w: &mut fmt::Formatter, it: &clean::Item, fn render_methods(w: &mut fmt::Formatter, it: &clean::Item) -> fmt::Result { match cache().impls.get(&it.def_id) { Some(v) => { - let (non_trait, traits) = v.partitioned(|i| i.impl_.trait_.is_none()); + let (non_trait, traits): (Vec<_>, _) = v.iter().cloned() + .partition(|i| i.impl_.trait_.is_none()); if non_trait.len() > 0 { try!(write!(w, "<h2 id='methods'>Methods</h2>")); for i in non_trait.iter() { @@ -2065,7 +2066,8 @@ fn render_methods(w: &mut fmt::Formatter, it: &clean::Item) -> fmt::Result { if traits.len() > 0 { try!(write!(w, "<h2 id='implementations'>Trait \ Implementations</h2>")); - let (derived, manual) = traits.partition(|i| i.impl_.derived); + let (derived, manual): (Vec<_>, _) = traits.into_iter() + .partition(|i| i.impl_.derived); for i in manual.iter() { try!(render_impl(w, i)); } |
