Skip to content

Commit

Permalink
fountain/doctest: simplify xor function
Browse files Browse the repository at this point in the history
  • Loading branch information
dspicher committed Feb 6, 2025
1 parent 4c58730 commit 15c91a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fountain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
//! A seeded `Xoshiro` RNG ensures that the receiver can reconstruct which segments
//! were combined into the part.
//! ```
//! let xor = |a: &[u8], b: &[u8]| {
//! let xor = |a: &[u8], b: &[u8]| -> Vec<_> {
//! a.iter()
//! .zip(b.iter())
//! .map(|(&x1, &x2)| x1 ^ x2)
//! .collect::<Vec<_>>()
//! .map(|(x1, x2)| x1 ^ x2)
//! .collect()
//! };
//!
//! let data = String::from("Ten chars!");
Expand Down

0 comments on commit 15c91a0

Please sign in to comment.