diff --git a/src/json/ser.rs b/src/json/ser.rs index 088fc5d1..10e7a1fc 100644 --- a/src/json/ser.rs +++ b/src/json/ser.rs @@ -19,7 +19,7 @@ impl Serializer { /// Creates a new JSON serializer. #[inline] - pub fn new(writer: W) -> Serializer { + pub fn new(writer: W) -> Self { Serializer::with_formatter(writer, CompactFormatter) } } @@ -29,7 +29,7 @@ impl Serializer> { /// Creates a new JSON pretty print serializer. #[inline] - pub fn pretty(writer: W) -> Serializer> { + pub fn pretty(writer: W) -> Self { Serializer::with_formatter(writer, PrettyFormatter::new()) } } @@ -41,7 +41,7 @@ impl Serializer /// Creates a new JSON visitor whose output will be written to the writer /// specified. #[inline] - pub fn with_formatter(writer: W, formatter: F) -> Serializer { + pub fn with_formatter(writer: W, formatter: F) -> Self { Serializer { writer: writer, formatter: formatter,