提交 d727f991 编写于 作者: O Oliver 'ker' Schneider 提交者: Oliver Schneider

lower FnMut to FnOnce since json-hack is no longer required

Conflicts:
	src/libserialize/serialize.rs
上级 f015a3b8
......@@ -1059,8 +1059,8 @@ fn emit_map<F>(&mut self, len: uint, f: F) -> EncodeResult where
self.end_tag()
}
fn emit_map_elt_key<F>(&mut self, _idx: uint, mut f: F) -> EncodeResult where
F: FnMut(&mut Encoder<'a, W>) -> EncodeResult,
fn emit_map_elt_key<F>(&mut self, _idx: uint, f: F) -> EncodeResult where
F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
{
try!(self.start_tag(EsMapKey as uint));
......
......@@ -668,8 +668,8 @@ fn emit_map<F>(&mut self, _len: uint, f: F) -> EncodeResult where
Ok(())
}
fn emit_map_elt_key<F>(&mut self, idx: uint, mut f: F) -> EncodeResult where
F: FnMut(&mut Encoder<'a>) -> EncodeResult,
fn emit_map_elt_key<F>(&mut self, idx: uint, f: F) -> EncodeResult where
F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
{
if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
if idx != 0 { try!(write!(self.writer, ",")) }
......@@ -961,8 +961,8 @@ fn emit_map<F>(&mut self, len: uint, f: F) -> EncodeResult where
Ok(())
}
fn emit_map_elt_key<F>(&mut self, idx: uint, mut f: F) -> EncodeResult where
F: FnMut(&mut PrettyEncoder<'a>) -> EncodeResult,
fn emit_map_elt_key<F>(&mut self, idx: uint, f: F) -> EncodeResult where
F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
{
if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
if idx == 0 {
......
......@@ -98,7 +98,7 @@ fn emit_seq_elt<F>(&mut self, idx: uint, f: F) -> Result<(), Self::Error>
fn emit_map<F>(&mut self, len: uint, f: F) -> Result<(), Self::Error>
where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
fn emit_map_elt_key<F>(&mut self, idx: uint, f: F) -> Result<(), Self::Error>
where F: FnMut(&mut Self) -> Result<(), Self::Error>;
where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
fn emit_map_elt_val<F>(&mut self, idx: uint, f: F) -> Result<(), Self::Error>
where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册