Using the Path in the log block to hopefully make using the library easier.
This commit is contained in:
parent
200be2c0db
commit
c15daad3b1
@ -4,11 +4,14 @@ macro_rules! log
|
|||||||
{
|
{
|
||||||
($log_level: expr, $($arg: tt)+) =>
|
($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;
|
let mut file_name: &str;
|
||||||
|
|
||||||
file_name = file!();
|
file_name = file!();
|
||||||
file_path = std::path::Path::new(file!());
|
file_path = Path::new(file!());
|
||||||
match file_path.file_name()
|
match file_path.file_name()
|
||||||
{
|
{
|
||||||
Some(name) =>
|
Some(name) =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user