summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs10
-rw-r--r--src/options.rs4
2 files changed, 11 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 757a8a7a..b12f02d1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -642,7 +642,15 @@ impl Builder {
/// Whitelist the given type so that it (and all types that it transitively
/// refers to) appears in the generated bindings. Regular expressions are
/// supported.
- pub fn whitelisted_type<T: AsRef<str>>(mut self, arg: T) -> Builder {
+ #[deprecated = "use whitelist_type instead"]
+ pub fn whitelisted_type<T: AsRef<str>>(self, arg: T) -> Builder {
+ self.whitelist_type(arg)
+ }
+
+ /// Whitelist the given type so that it (and all types that it transitively
+ /// refers to) appears in the generated bindings. Regular expressions are
+ /// supported.
+ pub fn whitelist_type<T: AsRef<str>>(mut self, arg: T) -> Builder {
self.options.whitelisted_types.insert(arg);
self
}
diff --git a/src/options.rs b/src/options.rs
index e9fab3cc..9ebedc5d 100644
--- a/src/options.rs
+++ b/src/options.rs
@@ -304,7 +304,7 @@ where
}
if let Some(hidden_types) = matches.values_of("blacklist-type") {
for ty in hidden_types {
- builder = builder.hide_type(ty);
+ builder = builder.blacklist_type(ty);
}
}
@@ -479,7 +479,7 @@ where
if let Some(whitelist) = matches.values_of("whitelist-type") {
for regex in whitelist {
- builder = builder.whitelisted_type(regex);
+ builder = builder.whitelist_type(regex);
}
}