From 69e9e2e48097e772555d5f8426adaaa89af5baa6 Mon Sep 17 00:00:00 2001 From: Robert Straw Date: Mon, 29 Dec 2014 08:33:33 -0600 Subject: [PATCH] Remove closure from format_args! call. --- src/lib.rs | 4 ++-- src/macros.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1314ec05e..64256ab82 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -273,7 +273,7 @@ impl Drop for DefaultLogger { /// It is not recommended to call this function directly, rather it should be /// invoked through the logging family of macros. #[doc(hidden)] -pub fn log(level: u32, loc: &'static LogLocation, args: &fmt::Arguments) { +pub fn log(level: u32, loc: &'static LogLocation, args: fmt::Arguments) { // Test the literal string from args against the current filter, if there // is one. match unsafe { FILTER.as_ref() } { @@ -326,7 +326,7 @@ pub struct LogRecord<'a> { pub level: LogLevel, /// The arguments from the log line. - pub args: &'a fmt::Arguments<'a>, + pub args: fmt::Arguments<'a>, /// The file of where the LogRecord originated. pub file: &'a str, diff --git a/src/macros.rs b/src/macros.rs index bcfe43c6e..38d391071 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -60,7 +60,7 @@ macro_rules! log { }; let lvl = $lvl; if log_enabled!(lvl) { - format_args!(|args| { ::log::log(lvl, &LOC, args) }, $($arg)+) + ::log::log(lvl, &LOC, format_args!($($arg)+)); } }) }