File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,7 @@ impl CanonicalFormatter {
105105 /// Returns a mutable reference to the top of the object stack.
106106 fn obj_mut ( & mut self ) -> Result < & mut Object > {
107107 self . object_stack . last_mut ( ) . ok_or_else ( || {
108- Error :: new (
109- ErrorKind :: Other ,
108+ Error :: other (
110109 "serde_json called an object method without calling begin_object first" ,
111110 )
112111 } )
@@ -229,8 +228,7 @@ impl Formatter for CanonicalFormatter {
229228
230229 fn end_object < W : Write + ?Sized > ( & mut self , writer : & mut W ) -> Result < ( ) > {
231230 let object = self . object_stack . pop ( ) . ok_or_else ( || {
232- Error :: new (
233- ErrorKind :: Other ,
231+ Error :: other (
234232 "serde_json called Formatter::end_object object method
235233 without calling begin_object first" ,
236234 )
You can’t perform that action at this time.
0 commit comments