From 0eaae32c9b78856112dcfe7201c16fffe4184638 Mon Sep 17 00:00:00 2001 From: Niklas Elsbrock Date: Fri, 20 Jun 2025 16:55:22 +0200 Subject: [PATCH] doc: fix hint about `Copy` restraint --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8210f92..7305f11 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,7 +13,8 @@ //! of the accumulator and returned to the caller. //! //! Since the accumulated value needs to be both stored as the accumulator *and* returned to the -//! caller, the accumulator type must implement [`Clone`]. +//! caller, the accumulator type must implement [`Copy`]. If you want to operate on non-copyable +//! types, you should use [`Iterator::scan`] instead. //! //! The returned iterator is **not** fused and it is not specified what happens when the base //! iterator returns [`None`].