Making the macro not require a use statement.

This commit is contained in:
Jason Travis Smith 2016-01-28 13:54:21 -05:00
parent c15daad3b1
commit d1e6e8f4fe
2 changed files with 20 additions and 7 deletions

View File

@ -2,9 +2,6 @@
extern crate scribe;
use scribe::*;
pub fn main()
{

View File

@ -45,8 +45,12 @@ macro_rules! error
{
($($arg: tt)*) =>
{
{
use scribe::LogLevel;
log!(LogLevel::ERROR, $($arg)*);
}
}
}
#[macro_export]
@ -54,8 +58,12 @@ macro_rules! warn
{
($($arg: tt)*) =>
{
{
use scribe::LogLevel;
log!(LogLevel::WARN, $($arg)*);
}
}
}
#[macro_export]
@ -63,8 +71,12 @@ macro_rules! info
{
($($arg: tt)*) =>
{
{
use scribe::LogLevel;
log!(LogLevel::INFO, $($arg)*);
}
}
}
#[macro_export]
@ -72,6 +84,10 @@ macro_rules! debug
{
($($arg: tt)*) =>
{
{
use scribe::LogLevel;
log!(LogLevel::DEBUG, $($arg)*);
}
}
}