diff options
author | Jeff Waugh <jdub@bethesignal.org> | 2016-10-08 04:07:28 +1100 |
---|---|---|
committer | Jeff Waugh <jdub@bethesignal.org> | 2016-10-08 04:07:28 +1100 |
commit | 061c5a98d40b9e0bc6ebc8bf0c8329a2ecd2001b (patch) | |
tree | 983052d65ad0f052d22d332c3eca3eef07e708c1 | |
parent | 5c9c228a043790c4f3107a35e77843d27a798160 (diff) |
Builder::whitelisted_type()
-rwxr-xr-x | src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -26,7 +26,6 @@ mod codegen { include!(concat!(env!("OUT_DIR"), "/codegen.rs")); } -use std::borrow::Borrow; use std::io::{self, Write}; use std::fs::OpenOptions; use std::path::Path; @@ -72,8 +71,8 @@ impl Builder { self } - pub fn whitelisted_type<T: Borrow<str>>(mut self, arg: &T) -> Builder { - self.options.whitelisted_types.insert(arg); + pub fn whitelisted_type<T: Into<String>>(mut self, arg: T) -> Builder { + self.options.whitelisted_types.insert(&arg.into()); self } |