You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.
Rust 1.51.0 introduced a .reduce() method on Iterator. This leads to the awkward situation where use reduce::Reduce; leads to a compile-time error on Rust 1.51.0, because .reduce() on an Iterator is now ambiguous whether we mean Reduce::reduce() or Iterator::reduce(). Ideally I'd like to resolve this for my crate's users without restricting the Rust version (further) - i.e., I'd like my crate to compile with both 1.50.0 and 1.51.0.
The first solution I thought of is to use rustversion to only use reduce::Reduce; on Rust 1.50.0 and earlier. But perhaps something could be done in this crate to make the process transparent? I'm not sure if there's any functionality difference between this crate's .reduce() and the new one in 1.51.0, but if the new standard one is preferable, then perhaps this crate could itself just pub use std::iter::Iterator::reduce; on 1.51.0+.
The text was updated successfully, but these errors were encountered:
Friendly ping on this - I've worked around it on my end with rustversion, but I still wonder if a workaround in this crate would be better / more transparent.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Rust 1.51.0 introduced a
.reduce()
method onIterator
. This leads to the awkward situation whereuse reduce::Reduce;
leads to a compile-time error on Rust 1.51.0, because.reduce()
on anIterator
is now ambiguous whether we meanReduce::reduce()
orIterator::reduce()
. Ideally I'd like to resolve this for my crate's users without restricting the Rust version (further) - i.e., I'd like my crate to compile with both 1.50.0 and 1.51.0.The first solution I thought of is to use
rustversion
to onlyuse reduce::Reduce;
on Rust 1.50.0 and earlier. But perhaps something could be done in this crate to make the process transparent? I'm not sure if there's any functionality difference between this crate's.reduce()
and the new one in 1.51.0, but if the new standard one is preferable, then perhaps this crate could itself justpub use std::iter::Iterator::reduce;
on 1.51.0+.The text was updated successfully, but these errors were encountered: