Skip to content

Commit

Permalink
feat(vh): Make variables handlers into features
Browse files Browse the repository at this point in the history
  • Loading branch information
andoriyu committed Apr 19, 2020
1 parent 7c11994 commit 139a9de
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ libc = "0.2"
uclicious_derive = { path = "uclicious_derive", version = "=0.1.3"}

[features]
default = ["derive"]
vh_env = []
vh_compound = []
vh_basic = ["vh_env", "vh_compound"]
default = ["derive", "vh_basic"]
derive = ["uclicious_derive"]

[[example]]
Expand Down
2 changes: 2 additions & 0 deletions src/variable_handlers.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#[cfg(feature = "vh_compound")]
pub mod compound;
#[cfg(feature = "vh_basic")]
pub mod env;
4 changes: 2 additions & 2 deletions src/variable_handlers/compound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ mod test {

#[test]
fn compound_handler() {
let mut www = |data: *const ::std::os::raw::c_uchar,
let www = |data: *const ::std::os::raw::c_uchar,
len: usize,
replace: *mut *mut ::std::os::raw::c_uchar,
replace_len: *mut usize,
Expand All @@ -101,7 +101,7 @@ mod test {
}
};

let mut zzz = |data: *const ::std::os::raw::c_uchar,
let zzz = |data: *const ::std::os::raw::c_uchar,
len: usize,
replace: *mut *mut ::std::os::raw::c_uchar,
replace_len: *mut usize,
Expand Down

0 comments on commit 139a9de

Please sign in to comment.