Skip to content

Commit f308fbc

Browse files
committed
Depreciate whitelisted function.
Closes rust-lang#985
1 parent b349cf7 commit f308fbc

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,11 +643,19 @@ impl Builder {
643643
/// Whitelist the given function so that it (and all types that it
644644
/// transitively refers to) appears in the generated bindings. Regular
645645
/// expressions are supported.
646-
pub fn whitelisted_function<T: AsRef<str>>(mut self, arg: T) -> Builder {
646+
pub fn whitelist_function<T: AsRef<str>>(mut self, arg: T) -> Builder {
647647
self.options.whitelisted_functions.insert(arg);
648648
self
649649
}
650650

651+
/// Whitelist the given function.
652+
///
653+
/// Deprecated: use whitelist_function instead.
654+
#[deprecated = "use whitelist_function instead"]
655+
pub fn whitelisted_function<T: AsRef<str>>(self, arg: T) -> Builder {
656+
self.whitelist_function(arg)
657+
}
658+
651659
/// Whitelist the given variable so that it (and all types that it
652660
/// transitively refers to) appears in the generated bindings. Regular
653661
/// expressions are supported.

src/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ where
473473

474474
if let Some(whitelist) = matches.values_of("whitelist-function") {
475475
for regex in whitelist {
476-
builder = builder.whitelisted_function(regex);
476+
builder = builder.whitelist_function(regex);
477477
}
478478
}
479479

0 commit comments

Comments
 (0)