@@ -48,9 +48,7 @@ impl Encode for Xz2Encoder {
48
48
49
49
match status {
50
50
Status :: Ok | Status :: StreamEnd => Ok ( ( ) ) ,
51
- Status :: GetCheck => Err ( io:: Error :: other (
52
- "Unexpected lzma integrity check"
53
- ) ) ,
51
+ Status :: GetCheck => Err ( io:: Error :: other ( "Unexpected lzma integrity check" ) ) ,
54
52
Status :: MemNeeded => Err ( io:: Error :: other ( "out of memory" ) ) ,
55
53
}
56
54
}
@@ -70,11 +68,8 @@ impl Encode for Xz2Encoder {
70
68
match status {
71
69
Status :: Ok => Ok ( false ) ,
72
70
Status :: StreamEnd => Ok ( true ) ,
73
- Status :: GetCheck => Err ( io:: Error :: new (
74
- io:: ErrorKind :: Other ,
75
- "Unexpected lzma integrity check" ,
76
- ) ) ,
77
- Status :: MemNeeded => Err ( io:: Error :: new ( io:: ErrorKind :: Other , "out of memory" ) ) ,
71
+ Status :: GetCheck => Err ( io:: Error :: other ( "Unexpected lzma integrity check" ) ) ,
72
+ Status :: MemNeeded => Err ( io:: Error :: other ( "out of memory" ) ) ,
78
73
}
79
74
}
80
75
@@ -93,11 +88,8 @@ impl Encode for Xz2Encoder {
93
88
match status {
94
89
Status :: Ok => Ok ( false ) ,
95
90
Status :: StreamEnd => Ok ( true ) ,
96
- Status :: GetCheck => Err ( io:: Error :: new (
97
- io:: ErrorKind :: Other ,
98
- "Unexpected lzma integrity check" ,
99
- ) ) ,
100
- Status :: MemNeeded => Err ( io:: Error :: new ( io:: ErrorKind :: Other , "out of memory" ) ) ,
91
+ Status :: GetCheck => Err ( io:: Error :: other ( "Unexpected lzma integrity check" ) ) ,
92
+ Status :: MemNeeded => Err ( io:: Error :: other ( "out of memory" ) ) ,
101
93
}
102
94
}
103
95
}
0 commit comments