File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
crates/compression-codecs/src Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ impl Decode for BzDecoder {
8080
8181 // There was insufficient memory in the input or output buffer to complete
8282 // the request, but otherwise everything went normally.
83- Status :: MemNeeded => Err ( io:: Error :: other ( "out of memory" ) ) ,
83+ Status :: MemNeeded => Err ( io:: ErrorKind :: OutOfMemory . into ( ) ) ,
8484 }
8585 }
8686
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ impl Encode for BzEncoder {
9191
9292 // There was insufficient memory in the input or output buffer to complete
9393 // the request, but otherwise everything went normally.
94- Status :: MemNeeded => Err ( io:: Error :: other ( "out of memory" ) ) ,
94+ Status :: MemNeeded => Err ( io:: ErrorKind :: OutOfMemory . into ( ) ) ,
9595 }
9696 }
9797
@@ -117,7 +117,7 @@ impl Encode for BzEncoder {
117117
118118 // There was insufficient memory in the input or output buffer to complete
119119 // the request, but otherwise everything went normally.
120- Status :: MemNeeded => Err ( io:: Error :: other ( "out of memory" ) ) ,
120+ Status :: MemNeeded => Err ( io:: ErrorKind :: OutOfMemory . into ( ) ) ,
121121 }
122122 }
123123
@@ -143,7 +143,7 @@ impl Encode for BzEncoder {
143143
144144 // There was insufficient memory in the input or output buffer to complete
145145 // the request, but otherwise everything went normally.
146- Status :: MemNeeded => Err ( io:: Error :: other ( "out of memory" ) ) ,
146+ Status :: MemNeeded => Err ( io:: ErrorKind :: OutOfMemory . into ( ) ) ,
147147 }
148148 }
149149}
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ impl Decode for Xz2Decoder {
7575 Status :: Ok => Ok ( false ) ,
7676 Status :: StreamEnd => Ok ( true ) ,
7777 Status :: GetCheck => Err ( io:: Error :: other ( "Unexpected lzma integrity check" ) ) ,
78- Status :: MemNeeded => Err ( io:: Error :: other ( "More memory needed" ) ) ,
78+ Status :: MemNeeded => Err ( io:: ErrorKind :: OutOfMemory . into ( ) ) ,
7979 }
8080 }
8181
@@ -103,7 +103,7 @@ impl Decode for Xz2Decoder {
103103 Status :: Ok => Ok ( false ) ,
104104 Status :: StreamEnd => Ok ( true ) ,
105105 Status :: GetCheck => Err ( io:: Error :: other ( "Unexpected lzma integrity check" ) ) ,
106- Status :: MemNeeded => Err ( io:: Error :: other ( "More memory needed" ) ) ,
106+ Status :: MemNeeded => Err ( io:: ErrorKind :: OutOfMemory . into ( ) ) ,
107107 }
108108 }
109109}
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ impl Encode for Xz2Encoder {
9595 match status {
9696 Status :: Ok | Status :: StreamEnd => Ok ( ( ) ) ,
9797 Status :: GetCheck => Err ( io:: Error :: other ( "Unexpected lzma integrity check" ) ) ,
98- Status :: MemNeeded => Err ( io:: Error :: other ( "out of memory" ) ) ,
98+ Status :: MemNeeded => Err ( io:: ErrorKind :: OutOfMemory . into ( ) ) ,
9999 }
100100 }
101101
@@ -120,7 +120,7 @@ impl Encode for Xz2Encoder {
120120 Status :: Ok => Ok ( false ) ,
121121 Status :: StreamEnd => Ok ( true ) ,
122122 Status :: GetCheck => Err ( io:: Error :: other ( "Unexpected lzma integrity check" ) ) ,
123- Status :: MemNeeded => Err ( io:: Error :: other ( "out of memory" ) ) ,
123+ Status :: MemNeeded => Err ( io:: ErrorKind :: OutOfMemory . into ( ) ) ,
124124 }
125125 }
126126
@@ -140,7 +140,7 @@ impl Encode for Xz2Encoder {
140140 Status :: Ok => Ok ( false ) ,
141141 Status :: StreamEnd => Ok ( true ) ,
142142 Status :: GetCheck => Err ( io:: Error :: other ( "Unexpected lzma integrity check" ) ) ,
143- Status :: MemNeeded => Err ( io:: Error :: other ( "out of memory" ) ) ,
143+ Status :: MemNeeded => Err ( io:: ErrorKind :: OutOfMemory . into ( ) ) ,
144144 }
145145 }
146146}
You can’t perform that action at this time.
0 commit comments