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.
This commit is contained in:
parent
50d9394582
commit
71bf19621a
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue