summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-10-07 13:37:16 -0500
committerGitHub <noreply@github.com>2016-10-07 13:37:16 -0500
commit7bb537eca58bf0428c6185e061ca094a5ef9b3b4 (patch)
tree3c5a193eadbb92a12c9cbb08dd08a97f4787bceb
parentad66b8c79a61f1112cc37ad5c63d597643dd2a0f (diff)
parent8d59ffc07d64601453b8181269f71deab94ca5a3 (diff)
Auto merge of #77 - jdub:more-bindgen-builder-functions, r=emilio
More bindgen builder functions
-rwxr-xr-xsrc/lib.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 5464675f..64dba22c 100755
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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
}