@@ -50,16 +50,16 @@ pub trait Peekable<T> {
50
50
fn peek ( & self ) -> bool ;
51
51
}
52
52
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 > }
55
55
56
56
pub fn oneshot < T : Send > ( ) -> ( PortOne < T > , ChanOne < T > ) {
57
57
let ( p, c) = rtcomm:: oneshot ( ) ;
58
58
( PortOne { x : p } , ChanOne { x : c } )
59
59
}
60
60
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 > }
63
63
64
64
pub fn stream < T : Send > ( ) -> ( Port < T > , Chan < T > ) {
65
65
let ( p, c) = rtcomm:: stream ( ) ;
@@ -153,7 +153,7 @@ impl<T: Send> Peekable<T> for Port<T> {
153
153
}
154
154
155
155
156
- pub struct SharedChan < T > { x : rtcomm:: SharedChan < T > }
156
+ pub struct SharedChan < T > { priv x: rtcomm:: SharedChan < T > }
157
157
158
158
impl < T : Send > SharedChan < T > {
159
159
pub fn new ( c : Chan < T > ) -> SharedChan < T > {
@@ -195,7 +195,7 @@ impl<T> Clone for SharedChan<T> {
195
195
}
196
196
}
197
197
198
- pub struct SharedPort < T > { x : rtcomm:: SharedPort < T > }
198
+ pub struct SharedPort < T > { priv x: rtcomm:: SharedPort < T > }
199
199
200
200
impl < T : Send > SharedPort < T > {
201
201
pub fn new ( p : Port < T > ) -> SharedPort < T > {
0 commit comments