iter: remove to_owned_vec
This needs to be removed as part of removing `~[T]`. Partial type hints are now allowed, and will remove the need to add a version of this method for `Vec<T>`. For now, this involves a few workarounds for partial type hints not completely working.
This commit is contained in:
parent
7e7a5e3d3e
commit
ae429056ff
18 changed files with 48 additions and 61 deletions
|
@ -1205,8 +1205,8 @@ fn item_trait(w: &mut Writer, it: &clean::Item,
|
|||
it.name.get_ref().as_slice(),
|
||||
t.generics,
|
||||
parents));
|
||||
let required = t.methods.iter().filter(|m| m.is_req()).to_owned_vec();
|
||||
let provided = t.methods.iter().filter(|m| !m.is_req()).to_owned_vec();
|
||||
let required = t.methods.iter().filter(|m| m.is_req()).collect::<~[&clean::TraitMethod]>();
|
||||
let provided = t.methods.iter().filter(|m| !m.is_req()).collect::<~[&clean::TraitMethod]>();
|
||||
|
||||
if t.methods.len() == 0 {
|
||||
try!(write!(w, "\\{ \\}"));
|
||||
|
@ -1502,11 +1502,11 @@ fn render_methods(w: &mut Writer, it: &clean::Item) -> fmt::Result {
|
|||
let mut non_trait = v.iter().filter(|p| {
|
||||
p.ref0().trait_.is_none()
|
||||
});
|
||||
let non_trait = non_trait.to_owned_vec();
|
||||
let non_trait = non_trait.collect::<~[&(clean::Impl, Option<~str>)]>();
|
||||
let mut traits = v.iter().filter(|p| {
|
||||
p.ref0().trait_.is_some()
|
||||
});
|
||||
let traits = traits.to_owned_vec();
|
||||
let traits = traits.collect::<~[&(clean::Impl, Option<~str>)]>();
|
||||
|
||||
if non_trait.len() > 0 {
|
||||
try!(write!(w, "<h2 id='methods'>Methods</h2>"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue