Skip to content

Commit a6d03cb

Browse files
committed
zlib required for displaying dependency licenses so removing the option.
1 parent e0d3024 commit a6d03cb

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

‎Cargo.toml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ name = "vtunngd"
88
path = "src/main.rs"
99

1010
[features]
11-
default = ["lzo", "zlib"]
11+
default = ["lzo"]
1212

1313
lzo=["dep:rust-lzo"]
14-
zlib=[]
1514

1615
[dependencies]
1716
libc = "0.2"

‎src/main/lfd_zlib.rs‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,17 @@
1818
*/
1919

2020
/* ZLIB compression module */
21-
#[cfg(feature = "zlib")]
2221
use std::io::Write;
2322
use crate::{lfd_mod, vtun_host};
2423
use crate::linkfd::{LfdMod, LfdModFactory};
2524
use crate::mainvtun::VtunContext;
2625
use crate::syslog::SyslogObject;
2726

28-
#[cfg(feature = "zlib")]
2927
struct LfdZlib {
3028
pub encoder: flate2::write::ZlibEncoder<Vec<u8>>,
3129
pub decoder: flate2::write::ZlibDecoder<Vec<u8>>
3230
}
3331

34-
#[cfg(feature = "zlib")]
3532
impl LfdZlib {
3633
pub fn new(ctx: &VtunContext, host: &vtun_host::VtunHost) -> LfdZlib {
3734
ctx.syslog(lfd_mod::LOG_INFO, "ZLIB compression initialized");
@@ -51,22 +48,12 @@ impl LfdZlibFactory {
5148
}
5249
}
5350
}
54-
#[cfg(feature = "zlib")]
5551
impl LfdModFactory for LfdZlibFactory {
5652
fn create(&self, ctx: &VtunContext, host: &mut vtun_host::VtunHost) -> Result<Box<dyn LfdMod>,i32> {
5753
Ok(Box::new(LfdZlib::new(ctx, host)))
5854
}
5955
}
6056

61-
#[cfg(not(feature = "zlib"))]
62-
impl LfdModFactory for LfdZlibFactory {
63-
fn create(&self, ctx: &VtunContext, _host: &mut vtun_host::VtunHost) -> Result<Box<dyn LfdMod>,i32> {
64-
ctx.syslog(lfd_mod::LOG_ERR, "ZLIB compression is not supported, rebuild with zlib enabled");
65-
Err(2)
66-
}
67-
}
68-
69-
#[cfg(feature = "zlib")]
7057
impl LfdMod for LfdZlib {
7158
fn encode(&mut self, ctx: &VtunContext, buf: &mut Vec<u8>) -> Result<(),()> {
7259
match self.encoder.write_all(buf) {

0 commit comments

Comments
 (0)