Skip to content

Commit

Permalink
Depreciate whitelisted function.
Browse files Browse the repository at this point in the history
  • Loading branch information
treiff committed Sep 14, 2017
1 parent b349cf7 commit f308fbc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit f308fbc

Please sign in to comment.