Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Commit 9e4c272

Browse files
committed
use core instead of std in hash_newtype macro
1 parent d780cb0 commit 9e4c272

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/util.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,14 @@ macro_rules! hash_newtype {
241241
}
242242
}
243243

244-
impl ::std::convert::From<$hash> for $newtype {
244+
impl ::core::convert::From<$hash> for $newtype {
245245
fn from(inner: $hash) -> $newtype {
246246
// Due to rust 1.22 we have to use this instead of simple `Self(inner)`
247247
Self { 0: inner }
248248
}
249249
}
250250

251-
impl ::std::convert::From<$newtype> for $hash {
251+
impl ::core::convert::From<$newtype> for $hash {
252252
fn from(hashtype: $newtype) -> $hash {
253253
hashtype.0
254254
}
@@ -290,9 +290,9 @@ macro_rules! hash_newtype {
290290
}
291291
}
292292

293-
impl ::std::str::FromStr for $newtype {
293+
impl ::core::str::FromStr for $newtype {
294294
type Err = $crate::hex::Error;
295-
fn from_str(s: &str) -> ::std::result::Result<$newtype, Self::Err> {
295+
fn from_str(s: &str) -> ::core::result::Result<$newtype, Self::Err> {
296296
$crate::hex::FromHex::from_hex(s)
297297
}
298298
}

0 commit comments

Comments
 (0)