BytesPattern from tupple
This commit is contained in:
parent
90576774fd
commit
3deb961413
@ -57,11 +57,19 @@ impl From<&str> for BytesPattern {
|
||||
}
|
||||
}
|
||||
|
||||
let bytes = HEXUPPER
|
||||
.decode(elements.join("").as_bytes())
|
||||
.expect("decode pattern");
|
||||
|
||||
Self::from((bytes, mask))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(Vec<u8>, Vec<bool>)> for BytesPattern {
|
||||
fn from(x: (Vec<u8>, Vec<bool>)) -> Self {
|
||||
let mut s = Self {
|
||||
bytes: HEXUPPER
|
||||
.decode(elements.join("").as_bytes())
|
||||
.expect("decode pattern"),
|
||||
mask,
|
||||
bytes: x.0,
|
||||
mask: x.1,
|
||||
pi: Vec::<usize>::new(),
|
||||
};
|
||||
s.prefix_function();
|
||||
|
Loading…
Reference in New Issue
Block a user