File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -151,19 +151,13 @@ impl CompressionEncoding {
151151 }
152152 b"identity" => Ok ( None ) ,
153153 other => {
154- // NOTE: Workaround for lifetime limitation. Resolved at Rust 1.79.
155- // https://blog.rust-lang.org/2024/06/13/Rust-1.79.0.html#extending-automatic-temporary-lifetime-extension
156- let other_debug_string;
154+ let other = match std:: str:: from_utf8 ( other) {
155+ Ok ( s) => s,
156+ Err ( _) => & format ! ( "{other:?}" ) ,
157+ } ;
157158
158159 let mut status = Status :: unimplemented ( format ! (
159- "Content is compressed with `{}` which isn't supported" ,
160- match std:: str :: from_utf8( other) {
161- Ok ( s) => s,
162- Err ( _) => {
163- other_debug_string = format!( "{other:?}" ) ;
164- & other_debug_string
165- }
166- }
160+ "Content is compressed with `{other}` which isn't supported"
167161 ) ) ;
168162
169163 let header_value = enabled_encodings
You can’t perform that action at this time.
0 commit comments