summaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorPhilipp Korber <p.korber@1aim.com>2018-11-16 18:11:33 +0100
committerPhilipp Korber <p.korber@1aim.com>2018-11-16 18:11:33 +0100
commit2a640a90d455cf7c380a591b5ab1fcd36641b212 (patch)
tree8b61c9259dc7ec57046703ee82d3abef00105d68 /mail
parent78d2473da36fa983fcdc9ed02a71f20961e7f8ec (diff)
refactor(mail/deps) now reexports `headers` instead of redefining it
Diffstat (limited to 'mail')
-rw-r--r--mail/src/lib.rs3
-rw-r--r--mail/src/macros.rs33
2 files changed, 0 insertions, 36 deletions
diff --git a/mail/src/lib.rs b/mail/src/lib.rs
index e799516..56fe2c2 100644
--- a/mail/src/lib.rs
+++ b/mail/src/lib.rs
@@ -99,7 +99,6 @@
extern crate mail_internals;
#[allow(unused_imports)]
-#[macro_use]
extern crate mail_headers;
pub extern crate mail_core as mail;
//pub extern crate mail_template as template;
@@ -164,8 +163,6 @@ pub use mail_headers::{
#[doc(hidden)]
pub use mail_headers::data;
-pub mod macros;
-
/// Re-export of the default_impl parts from both `mail-core` and `mail-template`.
///
/// This provides default implementations for a number of traits which might be needed
diff --git a/mail/src/macros.rs b/mail/src/macros.rs
deleted file mode 100644
index 0603ebc..0000000
--- a/mail/src/macros.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-//FIXE[rustc/macro reexport] re-export the macro once possible in stable
-// currently this won't work well so this is just a copy of the macro in
-// mail-headers ;=(
-/// Create a header map from a list of header's with ther fields
-///
-/// # Example
-///
-/// ```
-/// # #[macro_use]
-/// # extern crate mail_headers;
-/// # use mail_headers::headers::*;
-/// # use mail_headers::error::ComponentCreationError;
-/// # fn main() { (|| -> Result<(), ComponentCreationError> {
-/// let map = headers! {
-/// _From: ["bobo@nana.test"],
-/// Subject: "hy there"
-/// }?;
-/// # Ok(()) })(); }
-/// ```
-#[macro_export]
-macro_rules! headers {
- ($($header:ty : $val:expr),*) => ({
- //FIXME[rust/catch block] use catch block once available
- (|| -> Result<$crate::HeaderMap, ::mail::error::ComponentCreationError>
- {
- let mut map = ::mail::HeaderMap::new();
- $(
- map.insert(<$header as ::mail::HeaderKind>::body($val)?);
- )*
- Ok(map)
- })()
- });
-} \ No newline at end of file