提交 4a2f8ba8 编写于 作者: B bors

auto merge of #9559 : sfackler/rust/more-visibility, r=alexcrichton

......@@ -22,7 +22,7 @@
/// Writes to an owned, growable byte vector
pub struct MemWriter {
buf: ~[u8]
priv buf: ~[u8]
}
impl MemWriter {
......@@ -66,8 +66,8 @@ fn inner_mut_ref<'a>(&'a mut self) -> &'a mut ~[u8] {
/// Reads from an owned byte vector
pub struct MemReader {
buf: ~[u8],
pos: uint
priv buf: ~[u8],
priv pos: uint
}
impl MemReader {
......@@ -129,8 +129,8 @@ fn inner_mut_ref<'a>(&'a mut self) -> &'a mut ~[u8] {
/// Writes to a fixed-size byte slice
pub struct BufWriter<'self> {
buf: &'self mut [u8],
pos: uint
priv buf: &'self mut [u8],
priv pos: uint
}
impl<'self> BufWriter<'self> {
......@@ -157,8 +157,8 @@ fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
/// Reads from a fixed-size byte slice
pub struct BufReader<'self> {
buf: &'self [u8],
pos: uint
priv buf: &'self [u8],
priv pos: uint
}
impl<'self> BufReader<'self> {
......@@ -199,9 +199,9 @@ fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
///Calls a function with a MemWriter and returns
///the writer's stored vector.
pub fn with_mem_writer(writeFn:&fn(&mut MemWriter)) -> ~[u8] {
let mut writer = MemWriter::new();
writeFn(&mut writer);
writer.inner()
let mut writer = MemWriter::new();
writeFn(&mut writer);
writer.inner()
}
#[cfg(test)]
......
......@@ -15,7 +15,7 @@
use option::{Option, None, Some};
type Port = u16;
pub type Port = u16;
#[deriving(Eq, TotalEq, Clone)]
pub enum IpAddr {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册