1
Fork 0

Rollup merge of #55358 - sinkuu:redundant_clone2, r=estebank

Remove redundant clone (2)
This commit is contained in:
kennytm 2018-10-26 18:25:12 +08:00
commit 626b49666f
No known key found for this signature in database
GPG key ID: FEF6C8051D0E013C
35 changed files with 56 additions and 65 deletions

View file

@ -521,7 +521,7 @@ pub fn run(mut krate: clean::Crate,
external_html: external_html.clone(),
krate: krate.name.clone(),
},
css_file_extension: css_file_extension.clone(),
css_file_extension,
created_dirs: Default::default(),
sort_modules_alphabetically,
themes,
@ -1343,7 +1343,7 @@ impl DocFolder for Cache {
self.search_index.push(IndexItem {
ty: item.type_(),
name: s.to_string(),
path: path.join("::").to_string(),
path: path.join("::"),
desc: plain_summary_line(item.doc_value()),
parent,
parent_idx: None,
@ -2284,7 +2284,7 @@ fn document_short(w: &mut fmt::Formatter, cx: &Context, item: &clean::Item, link
format!("{} [Read more]({})",
&plain_summary_line(Some(s)), naive_assoc_href(item, link))
} else {
plain_summary_line(Some(s)).to_string()
plain_summary_line(Some(s))
};
render_markdown(w, cx, &markdown, item.links(), prefix)?;
} else if !prefix.is_empty() {
@ -2436,7 +2436,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
// (which is the position in the vector).
indices.dedup_by_key(|i| (items[*i].def_id,
if items[*i].name.as_ref().is_some() {
Some(full_path(cx, &items[*i]).clone())
Some(full_path(cx, &items[*i]))
} else {
None
},