about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorEric Holk <eric.holk@gmail.com>2012-08-06 18:29:05 -0700
committerEric Holk <eric.holk@gmail.com>2012-08-07 11:47:12 -0700
commit8d1922d4c80335d7c850e5856ae0ec549b8a0481 (patch)
tree8bce58dd458a2f89b2b7f19b51877e1783e7cbcb /src/libcore
parent184da128965d8c833c02feb3f16097e3a1a64417 (diff)
Add a selectable implementation for *packet_header
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/pipes.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/pipes.rs b/src/libcore/pipes.rs
index 33ee3cc52fb..e56bb456189 100644
--- a/src/libcore/pipes.rs
+++ b/src/libcore/pipes.rs
@@ -624,6 +624,10 @@ trait selectable {
     pure fn header() -> *packet_header;
 }
 
+impl of selectable for *packet_header {
+    pure fn header() -> *packet_header { self }
+}
+
 /// Returns the index of an endpoint that is ready to receive.
 fn selecti<T: selectable>(endpoints: &[T]) -> uint {
     wait_many(endpoints.map(|p| p.header()))