From 12cf2f0b0b059acd9d3997270749ea06cd38b19e Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Sun, 26 Apr 2015 11:01:55 -0700 Subject: [PATCH] Simplify the return types --- src/json/ser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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,