summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Waugh <jdub@bethesignal.org>2016-10-08 04:07:28 +1100
committerJeff Waugh <jdub@bethesignal.org>2016-10-08 04:07:28 +1100
commit061c5a98d40b9e0bc6ebc8bf0c8329a2ecd2001b (patch)
tree983052d65ad0f052d22d332c3eca3eef07e708c1
parent5c9c228a043790c4f3107a35e77843d27a798160 (diff)
Builder::whitelisted_type()
-rwxr-xr-xsrc/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index bd8e4cfa..544f0e5f 100755
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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
}