File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ impl JsonValue {
191191
192192 /// Pretty prints out the value as JSON string. Takes an argument that's
193193 /// number of spaces to indent new blocks with.
194- pub fn pretty < ' a > ( & self , spaces : u16 ) -> String {
194+ pub fn pretty ( & self , spaces : u16 ) -> String {
195195 let mut gen = Generator :: new ( false , spaces) ;
196196 gen. write_json ( self ) ;
197197 gen. consume ( )
@@ -211,7 +211,7 @@ pub fn stringify<T>(root: T) -> String where T: Into<JsonValue> {
211211
212212/// Pretty prints out the value as JSON string. Second argument is a
213213/// number of spaces to indent new blocks with.
214- pub fn stringify_pretty < ' a , T > ( root : T , spaces : u16 ) -> String where T : Into < JsonValue > {
214+ pub fn stringify_pretty < T > ( root : T , spaces : u16 ) -> String where T : Into < JsonValue > {
215215 let root: JsonValue = root. into ( ) ;
216216 root. pretty ( spaces)
217217}
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ impl<'a> Tokenizer<'a> {
7777 }
7878 }
7979
80- return label;
80+ label
8181 }
8282
8383 fn read_codepoint ( & mut self ) -> JsonResult < char > {
@@ -95,7 +95,7 @@ impl<'a> Tokenizer<'a> {
9595 let mut escape = false ;
9696
9797 while let Some ( ch) = self . source . next ( ) {
98- if ch == first && escape == false {
98+ if ch == first && ! escape {
9999 return Ok ( value) ;
100100 }
101101
@@ -181,7 +181,7 @@ impl<'a> Iterator for Tokenizer<'a> {
181181 }
182182 } ) ;
183183 }
184- return None ;
184+ None
185185 }
186186}
187187
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ impl JsonValue {
148148 _ => {
149149 * self = JsonValue :: new_object ( ) ;
150150 self . put ( key, JsonValue :: Null ) . unwrap ( ) ;
151- return self . get_mut ( key) . unwrap ( ) ;
151+ self . get_mut ( key) . unwrap ( )
152152 }
153153 }
154154 }
@@ -275,7 +275,7 @@ impl JsonValue {
275275impl Index < usize > for JsonValue {
276276 type Output = JsonValue ;
277277
278- fn index < ' a > ( & ' a self , index : usize ) -> & ' a JsonValue {
278+ fn index ( & self , index : usize ) -> & JsonValue {
279279 self . at ( index) . unwrap_or ( & NULL )
280280 }
281281}
You can’t perform that action at this time.
0 commit comments