librustdoc: use tuple indexing

This commit is contained in:
Jorge Aparicio 2014-12-09 12:58:15 -05:00
parent 0c5d22c9cd
commit e792338318
4 changed files with 7 additions and 7 deletions

View File

@ -346,7 +346,7 @@ fn primitive_link(f: &mut fmt::Formatter,
Some(root) => {
try!(write!(f, "<a href='{}{}/primitive.{}.html'>",
root,
path.ref0().head().unwrap(),
path.0.head().unwrap(),
prim.to_url_str()));
needs_termination = true;
}

View File

@ -323,7 +323,7 @@ pub fn run(mut krate: clean::Crate,
}).unwrap_or(HashMap::new());
let mut cache = Cache {
impls: HashMap::new(),
external_paths: paths.iter().map(|(&k, v)| (k, v.ref0().clone()))
external_paths: paths.iter().map(|(&k, v)| (k, v.0.clone()))
.collect(),
paths: paths,
implementors: HashMap::new(),

View File

@ -400,7 +400,7 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
.position(|&(p, _, _)| {
p == *pass
}) {
Some(i) => PASSES[i].val1(),
Some(i) => PASSES[i].1,
None => {
error!("unknown pass {}, skipping", *pass);
continue

View File

@ -151,14 +151,14 @@ fn summarize_item(item: &Item) -> (Counts, Option<ModuleSummary>) {
ImplItem(Impl { items: ref subitems, trait_: None, .. }) => {
let subcounts = subitems.iter().filter(|i| visible(*i))
.map(summarize_item)
.map(|s| s.val0())
.map(|s| s.0)
.fold(Counts::zero(), |acc, x| acc + x);
(subcounts, None)
}
// `pub` automatically
EnumItem(Enum { variants: ref subitems, .. }) => {
let subcounts = subitems.iter().map(summarize_item)
.map(|s| s.val0())
.map(|s| s.0)
.fold(Counts::zero(), |acc, x| acc + x);
(item_counts + subcounts, None)
}
@ -176,7 +176,7 @@ fn summarize_item(item: &Item) -> (Counts, Option<ModuleSummary>) {
let subcounts = trait_items.iter()
.map(extract_item)
.map(summarize_item)
.map(|s| s.val0())
.map(|s| s.0)
.fold(Counts::zero(), |acc, x| acc + x);
(item_counts + subcounts, None)
}
@ -212,7 +212,7 @@ pub fn build(krate: &Crate) -> ModuleSummary {
submodules: Vec::new(),
},
Some(ref item) => ModuleSummary {
name: krate.name.clone(), .. summarize_item(item).val1().unwrap()
name: krate.name.clone(), .. summarize_item(item).1.unwrap()
}
}
}