From 71bf19621aac8c9c691844b39e3d293372b4ba40 Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Wed, 16 Mar 2022 11:18:38 +1100 Subject: [PATCH] Use fully qualified path in macro As we do for the rest of the macros use the fully qualified path to `fmt` so users of the macro do not have to import it. --- src/internal_macros.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/internal_macros.rs b/src/internal_macros.rs index 1814420b..83219724 100644 --- a/src/internal_macros.rs +++ b/src/internal_macros.rs @@ -84,7 +84,7 @@ macro_rules! impl_array_newtype { pub fn into_bytes(self) -> [$ty; $len] { self.0 } } - impl<'a> ::core::convert::From<&'a [$ty]> for $thing { + impl<'a> core::convert::From<&'a [$ty]> for $thing { fn from(data: &'a [$ty]) -> $thing { assert_eq!(data.len(), $len); let mut ret = [0; $len]; @@ -109,7 +109,7 @@ macro_rules! impl_array_newtype { macro_rules! display_from_debug { ($thing:ident) => { - impl ::core::fmt::Display for $thing { + impl core::fmt::Display for $thing { fn fmt(&self, f: &mut ::core::fmt::Formatter) -> Result<(), ::core::fmt::Error> { ::core::fmt::Debug::fmt(self, f) } @@ -365,13 +365,13 @@ macro_rules! impl_bytes_newtype { impl ::core::fmt::Display for $t { fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - fmt::LowerHex::fmt(self, f) + ::core::fmt::LowerHex::fmt(self, f) } } impl ::core::fmt::Debug for $t { fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - fmt::LowerHex::fmt(self, f) + ::core::fmt::LowerHex::fmt(self, f) } }