Skip to content

Commit 26cad70

Browse files
committed
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.
1 parent bb495a2 commit 26cad70

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/internal_macros.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ macro_rules! impl_array_newtype {
8484
pub fn into_bytes(self) -> [$ty; $len] { self.0 }
8585
}
8686

87-
impl<'a> ::core::convert::From<&'a [$ty]> for $thing {
87+
impl<'a> core::convert::From<&'a [$ty]> for $thing {
8888
fn from(data: &'a [$ty]) -> $thing {
8989
assert_eq!(data.len(), $len);
9090
let mut ret = [0; $len];
@@ -109,7 +109,7 @@ macro_rules! impl_array_newtype {
109109

110110
macro_rules! display_from_debug {
111111
($thing:ident) => {
112-
impl ::core::fmt::Display for $thing {
112+
impl core::fmt::Display for $thing {
113113
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> Result<(), ::core::fmt::Error> {
114114
::core::fmt::Debug::fmt(self, f)
115115
}
@@ -365,13 +365,13 @@ macro_rules! impl_bytes_newtype {
365365

366366
impl ::core::fmt::Display for $t {
367367
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
368-
fmt::LowerHex::fmt(self, f)
368+
::core::fmt::LowerHex::fmt(self, f)
369369
}
370370
}
371371

372372
impl ::core::fmt::Debug for $t {
373373
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
374-
fmt::LowerHex::fmt(self, f)
374+
::core::fmt::LowerHex::fmt(self, f)
375375
}
376376
}
377377

0 commit comments

Comments
 (0)