Skip to content

Commit

Permalink
Warn that fold_ilp does not like iterators of references
Browse files Browse the repository at this point in the history
  • Loading branch information
HadrienG2 committed Apr 5, 2024
1 parent 8f021b3 commit 243e06b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "iterator_ilp"
# - Roll an annotated git tag
# - Add a github release
#
version = "2.1.1"
version = "2.1.2"
authors = ["Hadrien G. <[email protected]>"]
edition = "2021"
rust-version = "1.71.0"
Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ use num_traits::{One, Zero};
/// reduction callable will observe a different sequence of inputs, so it should
/// not rely on ordering of inputs for correctness.
///
/// Although many numerical types implement `Add<&T>` in addition to `Add<T>`
/// for user convenience, due to compiler limitations, better performance will
/// often be achieved when iterating over numerical types by value, rather than
/// by reference. If you have an iterator of references, you can usually achieve
/// this by calling [`Iterator::copied()`].
///
/// # Sum and product
///
/// The definition of the [`Sum`] and [`Product`] traits is very high-level and
Expand Down

0 comments on commit 243e06b

Please sign in to comment.