don't export private macro
This commit is contained in:
parent
644ca7d0d0
commit
32ecb05902
@ -91,7 +91,6 @@ pub enum DataError {
|
||||
}
|
||||
|
||||
// Maps a type to a variant of the DataError enum
|
||||
#[macro_export]
|
||||
macro_rules! easy_from_impl {
|
||||
($outer_type:ty, $from:ty => $to:expr) => (
|
||||
impl From<$from> for $outer_type {
|
||||
|
||||
@ -44,6 +44,21 @@ pub enum DownloadError {
|
||||
InvalidCachedImageLocation,
|
||||
}
|
||||
|
||||
// Maps a type to a variant of the DataError enum
|
||||
macro_rules! easy_from_impl {
|
||||
($outer_type:ty, $from:ty => $to:expr) => (
|
||||
impl From<$from> for $outer_type {
|
||||
fn from(err: $from) -> Self {
|
||||
$to(err)
|
||||
}
|
||||
}
|
||||
);
|
||||
($outer_type:ty, $from:ty => $to:expr, $($f:ty => $t:expr),+) => (
|
||||
easy_from_impl!($outer_type, $from => $to);
|
||||
easy_from_impl!($outer_type, $($f => $t),+);
|
||||
);
|
||||
}
|
||||
|
||||
easy_from_impl!(
|
||||
DownloadError,
|
||||
reqwest::Error => DownloadError::RequestError,
|
||||
|
||||
@ -53,7 +53,6 @@ extern crate pretty_assertions;
|
||||
|
||||
extern crate glob;
|
||||
extern crate mime_guess;
|
||||
#[macro_use]
|
||||
extern crate podcasts_data;
|
||||
extern crate reqwest;
|
||||
extern crate tempdir;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user