Skip to content

Commit 1fd38c1

Browse files
committed
Reviewer changes
1 parent 2df1ceb commit 1fd38c1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/librustc_resolve/build_reduced_graph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
372372

373373
ItemExternCrate(_) => {
374374
// n.b. we don't need to look at the path option here, because cstore already did
375-
for &crate_id in self.session.cstore.find_extern_mod_stmt_cnum(item.id).iter() {
375+
if let Some(crate_id) = self.session.cstore.find_extern_mod_stmt_cnum(item.id) {
376376
let def_id = DefId { krate: crate_id, node: 0 };
377377
self.external_exports.insert(def_id);
378378
let parent_link = ModuleParentLink(parent.downgrade(), name);

src/libsyntax/test.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,10 @@ impl<'a> fold::Folder for TestHarnessGenerator<'a> {
144144
// Make all tests public so we can call them from outside
145145
// the module (note that the tests are re-exported and must
146146
// be made public themselves to avoid privacy errors).
147-
let mut result = (*i).clone();
148-
result.vis = ast::Public;
149-
P(result)
147+
i.map(|mut i| {
148+
i.vis = ast::Public;
149+
i
150+
})
150151
}
151152
}
152153
} else {

0 commit comments

Comments
 (0)