Skip to content

Commit a68ab1c

Browse files
committed
Depreciate Builder::whitelisted_type.
Closes #987 Also, we were making a call to the now deprecated `Builder::hide_type`, changed that over to call `Builder::blacklist_type.
1 parent 80eff06 commit a68ab1c

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,15 @@ impl Builder {
642642
/// Whitelist the given type so that it (and all types that it transitively
643643
/// refers to) appears in the generated bindings. Regular expressions are
644644
/// supported.
645-
pub fn whitelisted_type<T: AsRef<str>>(mut self, arg: T) -> Builder {
645+
#[deprecated = "use whitelist_type instead"]
646+
pub fn whitelisted_type<T: AsRef<str>>(self, arg: T) -> Builder {
647+
self.whitelist_type(arg)
648+
}
649+
650+
/// Whitelist the given type so that it (and all types that it transitively
651+
/// refers to) appears in the generated bindings. Regular expressions are
652+
/// supported.
653+
pub fn whitelist_type<T: AsRef<str>>(mut self, arg: T) -> Builder {
646654
self.options.whitelisted_types.insert(arg);
647655
self
648656
}

src/options.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ where
304304
}
305305
if let Some(hidden_types) = matches.values_of("blacklist-type") {
306306
for ty in hidden_types {
307-
builder = builder.hide_type(ty);
307+
builder = builder.blacklist_type(ty);
308308
}
309309
}
310310

@@ -479,7 +479,7 @@ where
479479

480480
if let Some(whitelist) = matches.values_of("whitelist-type") {
481481
for regex in whitelist {
482-
builder = builder.whitelisted_type(regex);
482+
builder = builder.whitelist_type(regex);
483483
}
484484
}
485485

0 commit comments

Comments
 (0)