diff --git a/json/src/ser.rs b/json/src/ser.rs index c81bff269d..f41ef7e348 100644 --- a/json/src/ser.rs +++ b/json/src/ser.rs @@ -950,7 +950,7 @@ fn fmt_f64_or_null(wr: &mut W, value: f64) -> Result<()> /// Encode the specified struct into a json `[u8]` writer. #[inline] -pub fn to_writer(writer: &mut W, value: &T) -> Result<()> +pub fn to_writer(writer: &mut W, value: &T) -> Result<()> where W: io::Write, T: ser::Serialize, { @@ -961,7 +961,7 @@ pub fn to_writer(writer: &mut W, value: &T) -> Result<()> /// Encode the specified struct into a json `[u8]` writer. #[inline] -pub fn to_writer_pretty(writer: &mut W, value: &T) -> Result<()> +pub fn to_writer_pretty(writer: &mut W, value: &T) -> Result<()> where W: io::Write, T: ser::Serialize, {