#[derive(Eq, Hash, PartialEq)]
pub enum InfoHash {
V1(Vec<u8>),
}
impl std::fmt::Display for InfoHash {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::V1(bytes) => {
write!(
f,
"{}",
bytes.iter().map(|b| format!("{b:02x}")).collect::<String>()
)
}
}
}
}