diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-10-07 13:37:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-07 13:37:16 -0500 |
commit | 7bb537eca58bf0428c6185e061ca094a5ef9b3b4 (patch) | |
tree | 3c5a193eadbb92a12c9cbb08dd08a97f4787bceb | |
parent | ad66b8c79a61f1112cc37ad5c63d597643dd2a0f (diff) | |
parent | 8d59ffc07d64601453b8181269f71deab94ca5a3 (diff) |
Auto merge of #77 - jdub:more-bindgen-builder-functions, r=emilio
More bindgen builder functions
-rwxr-xr-x | src/lib.rs | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -72,8 +72,18 @@ impl Builder { self } - pub fn whitelisted_type<T: Borrow<str>>(mut self, arg: &T) -> Builder { - self.options.whitelisted_types.insert(arg); + pub fn whitelisted_type<T: Borrow<str>>(mut self, arg: T) -> Builder { + self.options.whitelisted_types.insert(&arg); + self + } + + pub fn whitelisted_function<T: Borrow<str>>(mut self, arg: T) -> Builder { + self.options.whitelisted_functions.insert(&arg); + self + } + + pub fn whitelisted_var<T: Borrow<str>>(mut self, arg: T) -> Builder { + self.options.whitelisted_vars.insert(&arg); self } |