diff --git a/src/json/ser.rs b/src/json/ser.rs index 10e7a1fc..a6fc2070 100644 --- a/src/json/ser.rs +++ b/src/json/ser.rs @@ -24,7 +24,7 @@ impl Serializer } } -impl Serializer> +impl<'a, W> Serializer> where W: io::Write, { /// Creates a new JSON pretty print serializer. @@ -309,13 +309,11 @@ pub struct PrettyFormatter<'a> { indent: &'a [u8], } -impl PrettyFormatter<'static> { +impl<'a> PrettyFormatter<'a> { fn new() -> Self { PrettyFormatter::with_indent(b" ") } -} -impl<'a> PrettyFormatter<'a> { fn with_indent(indent: &'a [u8]) -> Self { PrettyFormatter { current_indent: 0,