fix err! macro

This commit is contained in:
Antoine Martin 2019-12-01 21:25:43 +01:00
parent c420ed9e8b
commit 907e883d48
4 changed files with 3 additions and 5 deletions

View file

@ -1,5 +1,3 @@
use std::error::Error;
use super::err;
use super::Result;

View file

@ -4,5 +4,5 @@ pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
#[macro_export]
macro_rules! err {
($($string:expr),+) => (Box::<dyn Error>::from(format!($($string),+)))
($($string:expr),+) => (Box::<dyn std::error::Error>::from(format!($($string),+)))
}

View file

@ -8,5 +8,5 @@ pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
#[macro_export]
macro_rules! err {
($($string:expr),+) => (Box::<dyn Error>::from(format!($($string),+)))
($($string:expr),+) => (Box::<dyn std::error::Error>::from(format!($($string),+)))
}

View file

@ -4,5 +4,5 @@ pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
#[macro_export]
macro_rules! err {
($($string:expr),+) => (Box::<dyn Error>::from(format!($($string),+)))
($($string:expr),+) => (Box::<dyn std::error::Error>::from(format!($($string),+)))
}