@@ -36,7 +36,7 @@ impl Parse {
3636 pub ( crate ) fn new ( frame : Frame ) -> Result < Parse , ParseError > {
3737 let array = match frame {
3838 Frame :: Array ( array) => array,
39- frame => return Err ( format ! ( "protocol error; expected array, got {:?}" , frame ) . into ( ) ) ,
39+ frame => return Err ( format ! ( "protocol error; expected array, got {frame :?}" ) . into ( ) ) ,
4040 } ;
4141
4242 Ok ( Parse {
@@ -65,8 +65,7 @@ impl Parse {
6565 . map ( |s| s. to_string ( ) )
6666 . map_err ( |_| "protocol error; invalid string" . into ( ) ) ,
6767 frame => Err ( format ! (
68- "protocol error; expected simple frame or bulk frame, got {:?}" ,
69- frame
68+ "protocol error; expected simple frame or bulk frame, got {frame:?}"
7069 )
7170 . into ( ) ) ,
7271 }
@@ -85,8 +84,7 @@ impl Parse {
8584 Frame :: Simple ( s) => Ok ( Bytes :: from ( s. into_bytes ( ) ) ) ,
8685 Frame :: Bulk ( data) => Ok ( data) ,
8786 frame => Err ( format ! (
88- "protocol error; expected simple frame or bulk frame, got {:?}" ,
89- frame
87+ "protocol error; expected simple frame or bulk frame, got {frame:?}"
9088 )
9189 . into ( ) ) ,
9290 }
@@ -111,7 +109,7 @@ impl Parse {
111109 // fails, an error is returned.
112110 Frame :: Simple ( data) => atoi :: < u64 > ( data. as_bytes ( ) ) . ok_or_else ( || MSG . into ( ) ) ,
113111 Frame :: Bulk ( data) => atoi :: < u64 > ( & data) . ok_or_else ( || MSG . into ( ) ) ,
114- frame => Err ( format ! ( "protocol error; expected int frame but got {:?}" , frame ) . into ( ) ) ,
112+ frame => Err ( format ! ( "protocol error; expected int frame but got {frame :?}" ) . into ( ) ) ,
115113 }
116114 }
117115
0 commit comments