Skip to content

Commit

Permalink
Fix explicit_iter_loop in rustc_serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalrs committed Oct 16, 2024
1 parent d829780 commit b2b4ad4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions compiler/rustc_serialize/src/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ impl<D: Decoder, T: Decodable<D>> Decodable<D> for Rc<T> {
impl<S: Encoder, T: Encodable<S>> Encodable<S> for [T] {
default fn encode(&self, s: &mut S) {
s.emit_usize(self.len());
for e in self.iter() {
for e in self {
e.encode(s);
}
}
Expand Down Expand Up @@ -527,7 +527,7 @@ impl<D: Decoder, T: Decodable<D>> Decodable<D> for ThinVec<T> {
impl<S: Encoder, T: Encodable<S>> Encodable<S> for VecDeque<T> {
fn encode(&self, s: &mut S) {
s.emit_usize(self.len());
for e in self.iter() {
for e in self {
e.encode(s);
}
}
Expand All @@ -547,7 +547,7 @@ where
{
fn encode(&self, e: &mut S) {
e.emit_usize(self.len());
for (key, val) in self.iter() {
for (key, val) in self {
key.encode(e);
val.encode(e);
}
Expand All @@ -571,7 +571,7 @@ where
{
fn encode(&self, s: &mut S) {
s.emit_usize(self.len());
for e in self.iter() {
for e in self {
e.encode(s);
}
}
Expand All @@ -595,7 +595,7 @@ where
{
fn encode(&self, e: &mut E) {
e.emit_usize(self.len());
for (key, val) in self.iter() {
for (key, val) in self {
key.encode(e);
val.encode(e);
}
Expand All @@ -621,7 +621,7 @@ where
{
fn encode(&self, s: &mut E) {
s.emit_usize(self.len());
for e in self.iter() {
for e in self {
e.encode(s);
}
}
Expand All @@ -646,7 +646,7 @@ where
{
fn encode(&self, e: &mut E) {
e.emit_usize(self.len());
for (key, val) in self.iter() {
for (key, val) in self {
key.encode(e);
val.encode(e);
}
Expand All @@ -672,7 +672,7 @@ where
{
fn encode(&self, s: &mut E) {
s.emit_usize(self.len());
for e in self.iter() {
for e in self {
e.encode(s);
}
}
Expand Down

0 comments on commit b2b4ad4

Please sign in to comment.