Skip to content

Commit f61472d

Browse files
committed
librustc: Remove uses of advance.
1 parent 9e123c4 commit f61472d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/librustc/middle/graph.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,12 @@ impl<N,E> Graph<N,E> {
207207

208208
pub fn each_node<'a>(&'a self, f: |NodeIndex, &'a Node<N>| -> bool) -> bool {
209209
//! Iterates over all edges defined in the graph.
210-
self.nodes.iter().enumerate().advance(|(i, node)| f(NodeIndex(i), node))
210+
self.nodes.iter().enumerate().all(|(i, node)| f(NodeIndex(i), node))
211211
}
212212

213213
pub fn each_edge<'a>(&'a self, f: |EdgeIndex, &'a Edge<E>| -> bool) -> bool {
214214
//! Iterates over all edges defined in the graph
215-
self.edges.iter().enumerate().advance(|(i, edge)| f(EdgeIndex(i), edge))
215+
self.edges.iter().enumerate().all(|(i, edge)| f(EdgeIndex(i), edge))
216216
}
217217

218218
pub fn each_outgoing_edge<'a>(&'a self,

src/librustc/middle/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5149,7 +5149,7 @@ impl<'a> Resolver<'a> {
51495149
}
51505150
_ => {
51515151
let mut method_scope = false;
5152-
self.value_ribs.borrow().iter().rev().advance(|rib| {
5152+
self.value_ribs.borrow().iter().rev().all(|rib| {
51535153
let res = match *rib {
51545154
Rib { bindings: _, kind: MethodRibKind(_, _) } => true,
51555155
Rib { bindings: _, kind: ItemRibKind } => false,

src/librustc/middle/ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3887,13 +3887,13 @@ pub fn lookup_trait_def(cx: &ctxt, did: ast::DefId) -> Rc<ty::TraitDef> {
38873887
pub fn each_attr(tcx: &ctxt, did: DefId, f: |&ast::Attribute| -> bool) -> bool {
38883888
if is_local(did) {
38893889
let item = tcx.map.expect_item(did.node);
3890-
item.attrs.iter().advance(|attr| f(attr))
3890+
item.attrs.iter().all(|attr| f(attr))
38913891
} else {
38923892
info!("getting foreign attrs");
38933893
let mut cont = true;
38943894
csearch::get_item_attrs(&tcx.sess.cstore, did, |attrs| {
38953895
if cont {
3896-
cont = attrs.iter().advance(|attr| f(attr));
3896+
cont = attrs.iter().all(|attr| f(attr));
38973897
}
38983898
});
38993899
info!("done");

0 commit comments

Comments
 (0)