From 691d6ac895c4b177b589bece4910f56cf869ce60 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 17 Feb 2022 08:05:25 +0000 Subject: [PATCH] Move byte formatting macro to macro module --- src/dbs/export.rs | 7 ------- src/mac/mod.rs | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/dbs/export.rs b/src/dbs/export.rs index 9ae38a77..346c3fda 100644 --- a/src/dbs/export.rs +++ b/src/dbs/export.rs @@ -2,15 +2,8 @@ use crate::dbs::Executor; use crate::dbs::Options; use crate::dbs::Runtime; use crate::err::Error; -use bytes::Bytes; use hyper::body::Sender; -macro_rules! output { - ($expression:expr) => { - Bytes::from(format!("{}\n", $expression)) - }; -} - impl Executor { pub async fn export( &mut self, diff --git a/src/mac/mod.rs b/src/mac/mod.rs index c27e444a..8b57ece5 100644 --- a/src/mac/mod.rs +++ b/src/mac/mod.rs @@ -1,3 +1,9 @@ +macro_rules! output { + ($expression:expr) => { + bytes::Bytes::from(format!("{}\n", $expression)) + }; +} + macro_rules! map { ($($k:expr => $v:expr),* $(,)?) => {{ let mut m = ::std::collections::BTreeMap::new();