From 15c91a0d9cf5a4ee98013a4ab3b5bea19afccf59 Mon Sep 17 00:00:00 2001 From: Dominik Spicher Date: Thu, 6 Feb 2025 21:56:54 +0100 Subject: [PATCH] fountain/doctest: simplify xor function --- src/fountain.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fountain.rs b/src/fountain.rs index 85d7453..73a7faf 100644 --- a/src/fountain.rs +++ b/src/fountain.rs @@ -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::>() +//! .map(|(x1, x2)| x1 ^ x2) +//! .collect() //! }; //! //! let data = String::from("Ten chars!");