File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,8 @@ pub mod serialize {
318
318
pub enum DeError {
319
319
/// Serde custom error
320
320
Custom ( String ) ,
321
+ /// IO error from Writer
322
+ Io ( Arc < IoError > ) ,
321
323
/// Xml parsing error
322
324
InvalidXml ( Error ) ,
323
325
/// Cannot parse to integer
@@ -368,6 +370,7 @@ pub mod serialize {
368
370
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
369
371
match self {
370
372
DeError :: Custom ( s) => write ! ( f, "{}" , s) ,
373
+ DeError :: Io ( e) => write ! ( f, "{}" , e) ,
371
374
DeError :: InvalidXml ( e) => write ! ( f, "{}" , e) ,
372
375
DeError :: InvalidInt ( e) => write ! ( f, "{}" , e) ,
373
376
DeError :: InvalidFloat ( e) => write ! ( f, "{}" , e) ,
@@ -409,6 +412,13 @@ pub mod serialize {
409
412
}
410
413
}
411
414
415
+ impl From < IoError > for DeError {
416
+ #[ inline]
417
+ fn from ( e : IoError ) -> Self {
418
+ Self :: Io ( Arc :: new ( e) )
419
+ }
420
+ }
421
+
412
422
impl From < Error > for DeError {
413
423
#[ inline]
414
424
fn from ( e : Error ) -> Self {
You can’t perform that action at this time.
0 commit comments