Commit d6597d37 authored by xuwencheng's avatar xuwencheng

serde

parent a365233d
......@@ -34,6 +34,10 @@ pub fn is_buf<T: 'static>() -> bool {
TypeId::of::<T>() == TypeId::of::<Vec<u8>>()
}
pub fn is_unit<T: 'static>() -> bool {
TypeId::of::<T>() == TypeId::of::<()>()
}
pub fn short_link_hash(input: &str) -> String {
let mut hasher = DefaultHasher::new();
input.hash(&mut hasher);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment