Add imports in tag_hash macro

async
Manos Pitsidianakis 2020-02-28 09:04:01 +02:00
parent 53fa3d03da
commit c1a64d6c33
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,8 @@
#[macro_export]
macro_rules! tag_hash {
($tag:ident) => {{
use std::collections::hash_map::DefaultHasher;
use std::hash::Hasher;
let mut hasher = DefaultHasher::new();
hasher.write($tag.as_bytes());
hasher.finish()