From aed4229b510582c1d61e4bc355de245f28980966 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 12 Mar 2020 00:07:06 +0000 Subject: [PATCH] macros: Use $crate to refer to our own macros This aids compatibility with Rust 2018. --- src/macros.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/macros.rs b/src/macros.rs index c6d6053..95ed8ba 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -18,14 +18,14 @@ macro_rules! execute { ($fmt:expr, $( $id:ident = $value:expr ),* $(,)*) => ( { use $crate::{CommandSpecExt}; - command!($fmt, $( $id = $value ),*).unwrap().execute() + $crate::command!($fmt, $( $id = $value ),*).unwrap().execute() } ); } #[macro_export] macro_rules! sh_command { - ($fmt:expr) => ( sh_command!($fmt,) ); + ($fmt:expr) => ( $crate::sh_command!($fmt,) ); ($fmt:expr, $( $id:ident = $value:expr ),* $(,)*) => ( $crate::commandify( format!( @@ -44,7 +44,7 @@ macro_rules! sh_execute { ($fmt:expr, $( $id:ident = $value:expr ),* $(,)*) => ( { use $crate::{CommandSpecExt}; - sh_command!($fmt, $( $id = $value ),*).unwrap().execute() + $crate::sh_command!($fmt, $( $id = $value ),*).unwrap().execute() } ); } \ No newline at end of file