Skip to content

Commit 1dba7cb

Browse files
committed
Fiddle through the module visibilities for tests
1 parent a83e73d commit 1dba7cb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/libstd/sync/mpsc/select.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ impl Select {
158158
}
159159

160160
/// Helper method for skipping the preflight checks during testing
161-
fn wait2(&self, do_preflight_checks: bool) -> usize {
161+
pub(super) fn wait2(&self, do_preflight_checks: bool) -> usize {
162162
// Note that this is currently an inefficient implementation. We in
163163
// theory have knowledge about all receivers in the set ahead of time,
164164
// so this method shouldn't really have to iterate over all of them yet

src/libstd/sync/mpsc/select_tests.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ fn cloning3() {
210210
let mut h2 = s.handle(&rx2);
211211
unsafe { h2.add(); }
212212
unsafe { h1.add(); }
213-
assert_eq!(s.wait(), h2.id);
213+
assert_eq!(s.wait(), h2.id());
214214
tx3.send(()).unwrap();
215215
});
216216

@@ -256,7 +256,7 @@ fn preflight4() {
256256
let s = Select::new();
257257
let mut h = s.handle(&rx);
258258
unsafe { h.add(); }
259-
assert_eq!(s.wait2(false), h.id);
259+
assert_eq!(s.wait2(false), h.id());
260260
}
261261

262262
#[test]
@@ -267,7 +267,7 @@ fn preflight5() {
267267
let s = Select::new();
268268
let mut h = s.handle(&rx);
269269
unsafe { h.add(); }
270-
assert_eq!(s.wait2(false), h.id);
270+
assert_eq!(s.wait2(false), h.id());
271271
}
272272

273273
#[test]
@@ -278,7 +278,7 @@ fn preflight6() {
278278
let s = Select::new();
279279
let mut h = s.handle(&rx);
280280
unsafe { h.add(); }
281-
assert_eq!(s.wait2(false), h.id);
281+
assert_eq!(s.wait2(false), h.id());
282282
}
283283

284284
#[test]
@@ -288,7 +288,7 @@ fn preflight7() {
288288
let s = Select::new();
289289
let mut h = s.handle(&rx);
290290
unsafe { h.add(); }
291-
assert_eq!(s.wait2(false), h.id);
291+
assert_eq!(s.wait2(false), h.id());
292292
}
293293

294294
#[test]
@@ -300,7 +300,7 @@ fn preflight8() {
300300
let s = Select::new();
301301
let mut h = s.handle(&rx);
302302
unsafe { h.add(); }
303-
assert_eq!(s.wait2(false), h.id);
303+
assert_eq!(s.wait2(false), h.id());
304304
}
305305

306306
#[test]
@@ -313,7 +313,7 @@ fn preflight9() {
313313
let s = Select::new();
314314
let mut h = s.handle(&rx);
315315
unsafe { h.add(); }
316-
assert_eq!(s.wait2(false), h.id);
316+
assert_eq!(s.wait2(false), h.id());
317317
}
318318

319319
#[test]

0 commit comments

Comments
 (0)