Skip to content

Commit f017f5d

Browse files
committed
---
yaml --- r: 149358 b: refs/heads/try2 c: cac9107 h: refs/heads/master v: v3
1 parent fa9e05d commit f017f5d

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 68d576fd345b197e5be08cc9b84201e5897dc729
8+
refs/heads/try2: cac9107f38c1d28ed263759040b5411b0db47824
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustdoc/html/render.rs

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,15 +1111,15 @@ fn item_trait(w: &mut Writer, it: &clean::Item,
11111111
if_ok!(write!(w, "\\{\n"));
11121112
for m in required.iter() {
11131113
if_ok!(write!(w, " "));
1114-
if_ok!(render_method(w, m.item(), true));
1114+
if_ok!(render_method(w, m.item()));
11151115
if_ok!(write!(w, ";\n"));
11161116
}
11171117
if required.len() > 0 && provided.len() > 0 {
11181118
if_ok!(w.write("\n".as_bytes()));
11191119
}
11201120
for m in provided.iter() {
11211121
if_ok!(write!(w, " "));
1122-
if_ok!(render_method(w, m.item(), true));
1122+
if_ok!(render_method(w, m.item()));
11231123
if_ok!(write!(w, " \\{ ... \\}\n"));
11241124
}
11251125
if_ok!(write!(w, "\\}"));
@@ -1133,7 +1133,7 @@ fn item_trait(w: &mut Writer, it: &clean::Item,
11331133
if_ok!(write!(w, "<h3 id='{}.{}' class='method'><code>",
11341134
shortty(m.item()),
11351135
*m.item().name.get_ref()));
1136-
if_ok!(render_method(w, m.item(), false));
1136+
if_ok!(render_method(w, m.item()));
11371137
if_ok!(write!(w, "</code></h3>"));
11381138
if_ok!(document(w, m.item()));
11391139
Ok(())
@@ -1188,32 +1188,27 @@ fn item_trait(w: &mut Writer, it: &clean::Item,
11881188
})
11891189
}
11901190

1191-
fn render_method(w: &mut Writer, meth: &clean::Item,
1192-
withlink: bool) -> fmt::Result {
1191+
fn render_method(w: &mut Writer, meth: &clean::Item) -> fmt::Result {
11931192
fn fun(w: &mut Writer, it: &clean::Item, purity: ast::Purity,
1194-
g: &clean::Generics, selfty: &clean::SelfTy, d: &clean::FnDecl,
1195-
withlink: bool) -> fmt::Result {
1196-
write!(w, "{}fn {withlink, select,
1197-
true{<a href='\\#{ty}.{name}'
1198-
class='fnname'>{name}</a>}
1199-
other{<span class='fnname'>{name}</span>}
1200-
}{generics}{decl}",
1193+
g: &clean::Generics, selfty: &clean::SelfTy,
1194+
d: &clean::FnDecl) -> fmt::Result {
1195+
write!(w, "{}fn <a href='\\#{ty}.{name}' class='fnname'>{name}</a>\
1196+
{generics}{decl}",
12011197
match purity {
12021198
ast::UnsafeFn => "unsafe ",
12031199
_ => "",
12041200
},
12051201
ty = shortty(it),
12061202
name = it.name.get_ref().as_slice(),
12071203
generics = *g,
1208-
decl = Method(selfty, d),
1209-
withlink = if withlink {"true"} else {"false"})
1204+
decl = Method(selfty, d))
12101205
}
12111206
match meth.inner {
12121207
clean::TyMethodItem(ref m) => {
1213-
fun(w, meth, m.purity, &m.generics, &m.self_, &m.decl, withlink)
1208+
fun(w, meth, m.purity, &m.generics, &m.self_, &m.decl)
12141209
}
12151210
clean::MethodItem(ref m) => {
1216-
fun(w, meth, m.purity, &m.generics, &m.self_, &m.decl, withlink)
1211+
fun(w, meth, m.purity, &m.generics, &m.self_, &m.decl)
12171212
}
12181213
_ => unreachable!()
12191214
}
@@ -1444,7 +1439,7 @@ fn render_impl(w: &mut Writer, i: &clean::Impl,
14441439
fn docmeth(w: &mut Writer, item: &clean::Item) -> io::IoResult<bool> {
14451440
if_ok!(write!(w, "<h4 id='method.{}' class='method'><code>",
14461441
*item.name.get_ref()));
1447-
if_ok!(render_method(w, item, false));
1442+
if_ok!(render_method(w, item));
14481443
if_ok!(write!(w, "</code></h4>\n"));
14491444
match item.doc_value() {
14501445
Some(s) => {

0 commit comments

Comments
 (0)