Finish challenge 25 and update License
This commit is contained in:
@@ -148,11 +148,7 @@ impl Bytes {
|
||||
}
|
||||
|
||||
pub fn xor(Bytes(a): &Bytes, Bytes(b): &Bytes) -> Bytes {
|
||||
Bytes(
|
||||
Iterator::zip(a.iter(), b.iter())
|
||||
.map(|z| *(z.0) ^ *(z.1))
|
||||
.collect(),
|
||||
)
|
||||
Bytes(crate::utils::xor(a, b))
|
||||
}
|
||||
|
||||
pub fn xor_byte(Bytes(a): &Bytes, byte: u8) -> Bytes {
|
||||
|
||||
Reference in New Issue
Block a user