Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Be consistent about using where clause
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 25, 2016
1 parent c06760f commit afd41d8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions yaml/src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,13 @@ impl ser::Serializer for Serializer {
Ok((variant, state))
}

fn serialize_tuple_variant_elt<V: ser::Serialize>(
fn serialize_tuple_variant_elt<V>(
&mut self,
state: &mut (&'static str, yaml::Array),
v: V
) -> Result<()> {
) -> Result<()>
where V: ser::Serialize,
{
self.serialize_seq_elt(&mut state.1, v)
}

Expand Down Expand Up @@ -318,12 +320,14 @@ impl ser::Serializer for Serializer {
Ok((variant, state))
}

fn serialize_struct_variant_elt<V: ser::Serialize>(
fn serialize_struct_variant_elt<V>(
&mut self,
state: &mut (&'static str, yaml::Hash),
field: &'static str,
v: V
) -> Result<()> {
) -> Result<()>
where V: ser::Serialize,
{
self.serialize_map_elt(&mut state.1, field, v)
}

Expand Down

0 comments on commit afd41d8

Please sign in to comment.