diff options
author | Trevor Reiff <trevorreiff@gmail.com> | 2017-09-15 08:06:49 -0400 |
---|---|---|
committer | Trevor Reiff <trevorreiff@gmail.com> | 2017-09-15 08:06:49 -0400 |
commit | a68ab1cf22f443a962bf053e282bf761e3d339bd (patch) | |
tree | 9c9ab1861bf6f2612ce15384937bb5b2e30b8c51 | |
parent | 80eff064f1d59e174a7b114a6ef8e204f24492e7 (diff) |
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.
-rw-r--r-- | src/lib.rs | 10 | ||||
-rw-r--r-- | src/options.rs | 4 |
2 files changed, 11 insertions, 3 deletions
@@ -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); } } |