@@ -50,16 +50,16 @@ pub trait Peekable<T> {
5050 fn peek ( & self ) -> bool ;
5151}
5252
53- pub struct PortOne < T > { x : rtcomm:: PortOne < T > }
54- pub struct ChanOne < T > { x : rtcomm:: ChanOne < T > }
53+ pub struct PortOne < T > { priv x: rtcomm:: PortOne < T > }
54+ pub struct ChanOne < T > { priv x: rtcomm:: ChanOne < T > }
5555
5656pub fn oneshot < T : Send > ( ) -> ( PortOne < T > , ChanOne < T > ) {
5757 let ( p, c) = rtcomm:: oneshot ( ) ;
5858 ( PortOne { x : p } , ChanOne { x : c } )
5959}
6060
61- pub struct Port < T > { x : rtcomm:: Port < T > }
62- pub struct Chan < T > { x : rtcomm:: Chan < T > }
61+ pub struct Port < T > { priv x: rtcomm:: Port < T > }
62+ pub struct Chan < T > { priv x: rtcomm:: Chan < T > }
6363
6464pub fn stream < T : Send > ( ) -> ( Port < T > , Chan < T > ) {
6565 let ( p, c) = rtcomm:: stream ( ) ;
@@ -153,7 +153,7 @@ impl<T: Send> Peekable<T> for Port<T> {
153153}
154154
155155
156- pub struct SharedChan < T > { x : rtcomm:: SharedChan < T > }
156+ pub struct SharedChan < T > { priv x: rtcomm:: SharedChan < T > }
157157
158158impl < T : Send > SharedChan < T > {
159159 pub fn new ( c : Chan < T > ) -> SharedChan < T > {
@@ -195,7 +195,7 @@ impl<T> Clone for SharedChan<T> {
195195 }
196196}
197197
198- pub struct SharedPort < T > { x : rtcomm:: SharedPort < T > }
198+ pub struct SharedPort < T > { priv x: rtcomm:: SharedPort < T > }
199199
200200impl < T : Send > SharedPort < T > {
201201 pub fn new ( p : Port < T > ) -> SharedPort < T > {
0 commit comments