1
1
use alloc:: boxed:: Box ;
2
- use alloc:: string:: String ;
3
2
use alloc:: fmt;
3
+ use alloc:: string:: String ;
4
4
use core:: result;
5
5
use std:: error:: Error as StdError ;
6
6
use std:: io:: Error as IoError ;
@@ -10,7 +10,7 @@ pub type Result<T> = result::Result<T, Error>;
10
10
/// An enumeration over JPEG features (currently) unsupported by this library.
11
11
///
12
12
/// Support for features listed here may be included in future versions of this library.
13
- #[ derive( Debug ) ]
13
+ #[ derive( Debug , Clone ) ]
14
14
pub enum UnsupportedFeature {
15
15
/// Hierarchical JPEG.
16
16
Hierarchical ,
@@ -46,10 +46,10 @@ pub enum Error {
46
46
impl fmt:: Display for Error {
47
47
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
48
48
match * self {
49
- Error :: Format ( ref desc) => write ! ( f, "invalid JPEG format: {}" , desc) ,
49
+ Error :: Format ( ref desc) => write ! ( f, "invalid JPEG format: {}" , desc) ,
50
50
Error :: Unsupported ( ref feat) => write ! ( f, "unsupported JPEG feature: {:?}" , feat) ,
51
- Error :: Io ( ref err) => err. fmt ( f) ,
52
- Error :: Internal ( ref err) => err. fmt ( f) ,
51
+ Error :: Io ( ref err) => err. fmt ( f) ,
52
+ Error :: Internal ( ref err) => err. fmt ( f) ,
53
53
}
54
54
}
55
55
}
0 commit comments