diff options
author | Trevor Reiff <trevorreiff@gmail.com> | 2017-09-14 15:12:22 -0400 |
---|---|---|
committer | Trevor Reiff <trevorreiff@gmail.com> | 2017-09-14 15:12:22 -0400 |
commit | f308fbcf19b1de0d4cdbf85cafe5c0043c213b38 (patch) | |
tree | 028e4220bf041db71b8c9f2a9e3c5d5d79f0d12c | |
parent | b349cf7ea033e5f43334b804b67010d401874a52 (diff) |
Depreciate whitelisted function.
Closes #985
-rw-r--r-- | src/lib.rs | 10 | ||||
-rw-r--r-- | src/options.rs | 2 |
2 files changed, 10 insertions, 2 deletions
@@ -643,11 +643,19 @@ impl Builder { /// Whitelist the given function so that it (and all types that it /// transitively refers to) appears in the generated bindings. Regular /// expressions are supported. - pub fn whitelisted_function<T: AsRef<str>>(mut self, arg: T) -> Builder { + pub fn whitelist_function<T: AsRef<str>>(mut self, arg: T) -> Builder { self.options.whitelisted_functions.insert(arg); self } + /// Whitelist the given function. + /// + /// Deprecated: use whitelist_function instead. + #[deprecated = "use whitelist_function instead"] + pub fn whitelisted_function<T: AsRef<str>>(self, arg: T) -> Builder { + self.whitelist_function(arg) + } + /// Whitelist the given variable so that it (and all types that it /// transitively refers to) appears in the generated bindings. Regular /// expressions are supported. diff --git a/src/options.rs b/src/options.rs index 383a8899..47d6f33b 100644 --- a/src/options.rs +++ b/src/options.rs @@ -473,7 +473,7 @@ where if let Some(whitelist) = matches.values_of("whitelist-function") { for regex in whitelist { - builder = builder.whitelisted_function(regex); + builder = builder.whitelist_function(regex); } } |