@@ -55,16 +55,17 @@ pub trait Peekable<T> {
5555 fn peek ( & self ) -> bool ;
5656}
5757
58- pub struct PortOne < T > { priv x: rtcomm:: PortOne < T > }
59- pub struct ChanOne < T > { priv x: rtcomm:: ChanOne < T > }
58+ /* priv is disabled to allow users to get at traits like Select. */
59+ pub struct PortOne < T > { /* priv */ x : rtcomm:: PortOne < T > }
60+ pub struct ChanOne < T > { /* priv */ x : rtcomm:: ChanOne < T > }
6061
6162pub fn oneshot < T : Send > ( ) -> ( PortOne < T > , ChanOne < T > ) {
6263 let ( p, c) = rtcomm:: oneshot ( ) ;
6364 ( PortOne { x : p } , ChanOne { x : c } )
6465}
6566
66- pub struct Port < T > { priv x: rtcomm:: Port < T > }
67- pub struct Chan < T > { priv x: rtcomm:: Chan < T > }
67+ pub struct Port < T > { /* priv */ x : rtcomm:: Port < T > }
68+ pub struct Chan < T > { /* priv */ x : rtcomm:: Chan < T > }
6869
6970pub fn stream < T : Send > ( ) -> ( Port < T > , Chan < T > ) {
7071 let ( p, c) = rtcomm:: stream ( ) ;
@@ -158,7 +159,7 @@ impl<T: Send> Peekable<T> for Port<T> {
158159}
159160
160161
161- pub struct SharedChan < T > { priv x: rtcomm:: SharedChan < T > }
162+ pub struct SharedChan < T > { /* priv */ x : rtcomm:: SharedChan < T > }
162163
163164impl < T : Send > SharedChan < T > {
164165 pub fn new ( c : Chan < T > ) -> SharedChan < T > {
@@ -200,7 +201,7 @@ impl<T: Send> Clone for SharedChan<T> {
200201 }
201202}
202203
203- pub struct SharedPort < T > { priv x: rtcomm:: SharedPort < T > }
204+ pub struct SharedPort < T > { /* priv */ x : rtcomm:: SharedPort < T > }
204205
205206impl < T : Send > SharedPort < T > {
206207 pub fn new ( p : Port < T > ) -> SharedPort < T > {
0 commit comments