Finish challenge 25 and update License

This commit is contained in:
2022-08-14 12:01:51 -04:00
parent 5158c16d56
commit 1eb76f52b1
7 changed files with 75 additions and 33 deletions

View File

@@ -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 {