Remove unneeded mut
specifiers
This commit is contained in:
parent
79ff9fdafa
commit
81f84a4ea4
@ -488,7 +488,7 @@ fn deserialize_static_fields<F>(
|
||||
}
|
||||
}
|
||||
|
||||
fn find_serial_name<'a, I>(mut iterator: I) -> Option<token::InternedString> where
|
||||
fn find_serial_name<'a, I>(iterator: I) -> Option<token::InternedString> where
|
||||
I: Iterator<Item=&'a Attribute>
|
||||
{
|
||||
for at in iterator {
|
||||
|
@ -288,7 +288,7 @@ impl<W: Writer> ser::Serializer<IoError> for Serializer<W> {
|
||||
fn serialize_seq<
|
||||
T: Serialize<Serializer<W>, IoError>,
|
||||
Iter: Iterator<Item=T>
|
||||
>(&mut self, mut iter: Iter) -> IoResult<()> {
|
||||
>(&mut self, iter: Iter) -> IoResult<()> {
|
||||
try!(self.wr.write_str("["));
|
||||
let mut first = true;
|
||||
for elt in iter {
|
||||
@ -308,7 +308,7 @@ impl<W: Writer> ser::Serializer<IoError> for Serializer<W> {
|
||||
K: Serialize<Serializer<W>, IoError>,
|
||||
V: Serialize<Serializer<W>, IoError>,
|
||||
Iter: Iterator<Item=(K, V)>
|
||||
>(&mut self, mut iter: Iter) -> IoResult<()> {
|
||||
>(&mut self, iter: Iter) -> IoResult<()> {
|
||||
try!(self.wr.write_str("{"));
|
||||
let mut first = true;
|
||||
for (key, value) in iter {
|
||||
@ -542,7 +542,7 @@ impl<W: Writer> ser::Serializer<IoError> for PrettySerializer<W> {
|
||||
fn serialize_seq<
|
||||
T: Serialize<PrettySerializer<W>, IoError>,
|
||||
Iter: Iterator<Item=T>
|
||||
>(&mut self, mut iter: Iter) -> IoResult<()> {
|
||||
>(&mut self, iter: Iter) -> IoResult<()> {
|
||||
try!(self.wr.write_str("["));
|
||||
|
||||
self.first = true;
|
||||
@ -559,7 +559,7 @@ impl<W: Writer> ser::Serializer<IoError> for PrettySerializer<W> {
|
||||
K: Serialize<PrettySerializer<W>, IoError>,
|
||||
V: Serialize<PrettySerializer<W>, IoError>,
|
||||
Iter: Iterator<Item=(K, V)>
|
||||
>(&mut self, mut iter: Iter) -> IoResult<()> {
|
||||
>(&mut self, iter: Iter) -> IoResult<()> {
|
||||
try!(self.wr.write_str("{"));
|
||||
|
||||
self.first = true;
|
||||
|
@ -552,7 +552,7 @@ mod tests {
|
||||
fn serialize_seq<
|
||||
T: Serialize<AssertSerializer<Iter>, Error>,
|
||||
SeqIter: Iterator<Item=T>
|
||||
>(&mut self, mut iter: SeqIter) -> Result<(), Error> {
|
||||
>(&mut self, iter: SeqIter) -> Result<(), Error> {
|
||||
let (len, _) = iter.size_hint();
|
||||
try!(self.serialize(Token::SeqStart(len)));
|
||||
for elt in iter {
|
||||
@ -565,7 +565,7 @@ mod tests {
|
||||
K: Serialize<AssertSerializer<Iter>, Error>,
|
||||
V: Serialize<AssertSerializer<Iter>, Error>,
|
||||
MapIter: Iterator<Item=(K, V)>
|
||||
>(&mut self, mut iter: MapIter) -> Result<(), Error> {
|
||||
>(&mut self, iter: MapIter) -> Result<(), Error> {
|
||||
let (len, _) = iter.size_hint();
|
||||
try!(self.serialize(Token::MapStart(len)));
|
||||
for (key, value) in iter {
|
||||
|
Loading…
Reference in New Issue
Block a user