@@ -9,7 +9,7 @@ use super::*;
99use crate :: mem;
1010
1111#[ derive( Clone , Default ) ]
12- pub struct ErrorMessage ( Option < & ' static str > ) ;
12+ pub struct ErrorMessage ( pub ( crate ) Option < & ' static str > ) ;
1313
1414impl ErrorMessage {
1515 pub fn get ( & self ) -> Option < & str > {
@@ -55,34 +55,27 @@ impl Default for StreamWrapper {
5555 // zlib-ng
5656 feature = "zlib-ng" ,
5757 // libz-sys
58- all( not( feature = "cloudflare_zlib" ) , not( feature = "zlib-ng" ) , not ( feature = "zlib-rs" ) )
58+ all( not( feature = "cloudflare_zlib" ) , not( feature = "zlib-ng" ) )
5959 ) ) ]
6060 zalloc : allocator:: zalloc,
6161 #[ cfg( any(
6262 // zlib-ng
6363 feature = "zlib-ng" ,
6464 // libz-sys
65- all( not( feature = "cloudflare_zlib" ) , not( feature = "zlib-ng" ) , not ( feature = "zlib-rs" ) )
65+ all( not( feature = "cloudflare_zlib" ) , not( feature = "zlib-ng" ) )
6666 ) ) ]
6767 zfree : allocator:: zfree,
6868
6969 #[ cfg(
7070 // cloudflare-zlib
71- all( feature = "cloudflare_zlib" , not( feature = "zlib-rs" ) , not ( feature = "zlib- ng") ) ,
71+ all( feature = "cloudflare_zlib" , not( feature = "zlib-ng" ) ) ,
7272 ) ]
7373 zalloc : Some ( allocator:: zalloc) ,
7474 #[ cfg(
7575 // cloudflare-zlib
76- all( feature = "cloudflare_zlib" , not( feature = "zlib-rs" ) , not ( feature = "zlib- ng") ) ,
76+ all( feature = "cloudflare_zlib" , not( feature = "zlib-ng" ) ) ,
7777 ) ]
7878 zfree : Some ( allocator:: zfree) ,
79-
80- // for zlib-rs, it is most efficient to have it provide the allocator.
81- // The libz-rs-sys dependency is configured to use the rust system allocator
82- #[ cfg( all( feature = "zlib-rs" , not( feature = "zlib-ng" ) ) ) ]
83- zalloc : None ,
84- #[ cfg( all( feature = "zlib-rs" , not( feature = "zlib-ng" ) ) ) ]
85- zfree : None ,
8679 } ) ) ,
8780 }
8881 }
@@ -102,9 +95,9 @@ impl Drop for StreamWrapper {
10295 // zlib-ng
10396 feature = "zlib-ng" ,
10497 // cloudflare-zlib
105- all( feature = "cloudflare_zlib" , not( feature = "zlib-rs" ) , not ( feature = "zlib- ng") ) ,
98+ all( feature = "cloudflare_zlib" , not( feature = "zlib-ng" ) ) ,
10699 // libz-sys
107- all( not( feature = "cloudflare_zlib" ) , not( feature = "zlib-ng" ) , not ( feature = "zlib-rs" ) ) ,
100+ all( not( feature = "cloudflare_zlib" ) , not( feature = "zlib-ng" ) ) ,
108101) ) ]
109102mod allocator {
110103 use super :: * ;
@@ -462,18 +455,18 @@ mod c_backend {
462455 #[ cfg( feature = "zlib-ng" ) ]
463456 use libz_ng_sys as libz;
464457
465- #[ cfg( all ( feature = "zlib-rs" , not( feature = "zlib-ng" ) ) ) ]
458+ #[ cfg( not( feature = "zlib-ng" ) ) ]
466459 use libz_rs_sys as libz;
467460
468461 #[ cfg(
469462 // cloudflare-zlib
470- all( feature = "cloudflare_zlib" , not( feature = "zlib-rs" ) , not ( feature = "zlib- ng") ) ,
463+ all( feature = "cloudflare_zlib" , not( feature = "zlib-ng" ) ) ,
471464 ) ]
472465 use cloudflare_zlib_sys as libz;
473466
474467 #[ cfg(
475468 // libz-sys
476- all( not( feature = "cloudflare_zlib" ) , not( feature = "zlib-ng" ) , not ( feature = "zlib-rs" ) ) ,
469+ all( not( feature = "cloudflare_zlib" ) , not( feature = "zlib-ng" ) ) ,
477470 ) ]
478471 use libz_sys as libz;
479472
0 commit comments