diff --git a/src/lib.rs b/src/lib.rs index 5eef212..6d5fa42 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -183,13 +183,19 @@ impl Config { } fn compiler(&self, target: &str) -> String { - let compiler_fn: fn(&str) -> String = if self.cpp { gxx } else { gcc }; - compiler_fn(target) + if self.cpp { + gxx(target) + } else { + gcc(target) + } } fn compile_flags(&self) -> Vec { - let flags_fn: fn() -> Vec = if self.cpp { cxxflags } else { cflags }; - flags_fn() + if self.cpp { + cxxflags() + } else { + cflags() + } } fn compile_cmd(&self) -> Command {