@@ -127,13 +127,10 @@ pub(crate) async fn parse_status<T: Stream<Item = io::Result<ResponseData>> + Un
127
127
) ) )
128
128
}
129
129
_ => {
130
- return Err ( Error :: Io ( io:: Error :: new (
131
- io:: ErrorKind :: Other ,
132
- format ! (
133
- "status: {:?}, code: {:?}, information: {:?}" ,
134
- status, code, information
135
- ) ,
136
- ) ) ) ;
130
+ return Err ( Error :: Io ( io:: Error :: other ( format ! (
131
+ "status: {:?}, code: {:?}, information: {:?}" ,
132
+ status, code, information
133
+ ) ) ) ) ;
137
134
}
138
135
}
139
136
}
@@ -273,13 +270,10 @@ pub(crate) async fn parse_mailbox<T: Stream<Item = io::Result<ResponseData>> + U
273
270
) ) )
274
271
}
275
272
_ => {
276
- return Err ( Error :: Io ( io:: Error :: new (
277
- io:: ErrorKind :: Other ,
278
- format ! (
279
- "status: {:?}, code: {:?}, information: {:?}" ,
280
- status, code, information
281
- ) ,
282
- ) ) ) ;
273
+ return Err ( Error :: Io ( io:: Error :: other ( format ! (
274
+ "status: {:?}, code: {:?}, information: {:?}" ,
275
+ status, code, information
276
+ ) ) ) ) ;
283
277
}
284
278
}
285
279
}
@@ -327,13 +321,10 @@ pub(crate) async fn parse_mailbox<T: Stream<Item = io::Result<ResponseData>> + U
327
321
) ) )
328
322
}
329
323
_ => {
330
- return Err ( Error :: Io ( io:: Error :: new (
331
- io:: ErrorKind :: Other ,
332
- format ! (
333
- "status: {:?}, code: {:?}, information: {:?}" ,
334
- status, code, information
335
- ) ,
336
- ) ) ) ;
324
+ return Err ( Error :: Io ( io:: Error :: other ( format ! (
325
+ "status: {:?}, code: {:?}, information: {:?}" ,
326
+ status, code, information
327
+ ) ) ) ) ;
337
328
}
338
329
}
339
330
}
0 commit comments