Added more restriction for blocks and zone names.
This commit is contained in:
@@ -12,6 +12,7 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
// For deserialization
|
||||
use serde::de::{Error as DeError, Visitor};
|
||||
use std::ops::Deref;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Bytes {
|
||||
@@ -110,6 +111,12 @@ impl Ord for Bytes {
|
||||
}
|
||||
}
|
||||
|
||||
impl Hash for Bytes {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
state.write(&self.data);
|
||||
}
|
||||
}
|
||||
|
||||
impl Deref for Bytes {
|
||||
type Target = Vec<u8>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user