libstd: Remove some residual mutable fields

This commit is contained in:
Patrick Walton
2013-05-03 17:55:53 -07:00
parent d12d25534b
commit c7522417d4
2 changed files with 34 additions and 1 deletions

View File

@@ -220,11 +220,18 @@ impl serialize::Encoder for Encoder {
}
}
#[cfg(stage0)]
pub struct PrettyEncoder {
priv wr: @io::Writer,
priv mut indent: uint,
}
#[cfg(not(stage0))]
pub struct PrettyEncoder {
priv wr: @io::Writer,
priv indent: uint,
}
pub fn PrettyEncoder(wr: @io::Writer) -> PrettyEncoder {
PrettyEncoder {
wr: wr,
@@ -838,10 +845,16 @@ pub fn from_str(s: &str) -> Result<Json, Error> {
}
}
#[cfg(stage0)]
pub struct Decoder {
priv mut stack: ~[Json],
}
#[cfg(not(stage0))]
pub struct Decoder {
priv stack: ~[Json],
}
pub fn Decoder(json: Json) -> Decoder {
Decoder {
stack: ~[json]