From c15daad3b1ed0e28aef6c4516ef5525af6e8d66d Mon Sep 17 00:00:00 2001 From: Jason Travis Smith Date: Thu, 28 Jan 2016 13:49:22 -0500 Subject: [PATCH] Using the Path in the log block to hopefully make using the library easier. --- src/macros.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/macros.rs b/src/macros.rs index f890d27..1c87656 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -4,11 +4,14 @@ macro_rules! log { ($log_level: expr, $($arg: tt)+) => ({ - let file_path: &std::path::Path; + // Specifically use the Path from std in this block. + use std::path::Path; + + let file_path: &Path; let mut file_name: &str; file_name = file!(); - file_path = std::path::Path::new(file!()); + file_path = Path::new(file!()); match file_path.file_name() { Some(name) =>