Skip to content

Commit e792338

Browse files
author
Jorge Aparicio
committed
librustdoc: use tuple indexing
1 parent 0c5d22c commit e792338

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/librustdoc/html/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ fn primitive_link(f: &mut fmt::Formatter,
346346
Some(root) => {
347347
try!(write!(f, "<a href='{}{}/primitive.{}.html'>",
348348
root,
349-
path.ref0().head().unwrap(),
349+
path.0.head().unwrap(),
350350
prim.to_url_str()));
351351
needs_termination = true;
352352
}

src/librustdoc/html/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ pub fn run(mut krate: clean::Crate,
323323
}).unwrap_or(HashMap::new());
324324
let mut cache = Cache {
325325
impls: HashMap::new(),
326-
external_paths: paths.iter().map(|(&k, v)| (k, v.ref0().clone()))
326+
external_paths: paths.iter().map(|(&k, v)| (k, v.0.clone()))
327327
.collect(),
328328
paths: paths,
329329
implementors: HashMap::new(),

src/librustdoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
400400
.position(|&(p, _, _)| {
401401
p == *pass
402402
}) {
403-
Some(i) => PASSES[i].val1(),
403+
Some(i) => PASSES[i].1,
404404
None => {
405405
error!("unknown pass {}, skipping", *pass);
406406
continue

src/librustdoc/stability_summary.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,14 @@ fn summarize_item(item: &Item) -> (Counts, Option<ModuleSummary>) {
151151
ImplItem(Impl { items: ref subitems, trait_: None, .. }) => {
152152
let subcounts = subitems.iter().filter(|i| visible(*i))
153153
.map(summarize_item)
154-
.map(|s| s.val0())
154+
.map(|s| s.0)
155155
.fold(Counts::zero(), |acc, x| acc + x);
156156
(subcounts, None)
157157
}
158158
// `pub` automatically
159159
EnumItem(Enum { variants: ref subitems, .. }) => {
160160
let subcounts = subitems.iter().map(summarize_item)
161-
.map(|s| s.val0())
161+
.map(|s| s.0)
162162
.fold(Counts::zero(), |acc, x| acc + x);
163163
(item_counts + subcounts, None)
164164
}
@@ -176,7 +176,7 @@ fn summarize_item(item: &Item) -> (Counts, Option<ModuleSummary>) {
176176
let subcounts = trait_items.iter()
177177
.map(extract_item)
178178
.map(summarize_item)
179-
.map(|s| s.val0())
179+
.map(|s| s.0)
180180
.fold(Counts::zero(), |acc, x| acc + x);
181181
(item_counts + subcounts, None)
182182
}
@@ -212,7 +212,7 @@ pub fn build(krate: &Crate) -> ModuleSummary {
212212
submodules: Vec::new(),
213213
},
214214
Some(ref item) => ModuleSummary {
215-
name: krate.name.clone(), .. summarize_item(item).val1().unwrap()
215+
name: krate.name.clone(), .. summarize_item(item).1.unwrap()
216216
}
217217
}
218218
}

0 commit comments

Comments
 (0)