diff --git a/gcc-test/build.rs b/gcc-test/build.rs
index c78e8dd..0379a60 100644
--- a/gcc-test/build.rs
+++ b/gcc-test/build.rs
@@ -14,7 +14,7 @@ fn main() {
.flag_if_supported("-Wall")
.flag_if_supported("-Wfoo-bar-this-flag-does-not-exist")
.define("FOO", None)
- .define("BAR", Some("1"))
+ .define("BAR", "1")
.compile("libfoo.a");
gcc::Config::new()
diff --git a/src/lib.rs b/src/lib.rs
index 7106e32..8686da3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -261,12 +261,12 @@ impl Config {
/// ```no_run
/// gcc::Config::new()
/// .file("src/foo.c")
- /// .define("FOO", Some("BAR"))
+ /// .define("FOO", "BAR")
/// .define("BAZ", None)
/// .compile("foo");
/// ```
- pub fn define(&mut self, var: &str, val: Option<&str>) -> &mut Config {
- self.definitions.push((var.to_string(), val.map(|s| s.to_string())));
+ pub fn define<'a, V: Into