]> git.lizzy.rs Git - rust.git/commit
Document the behaviour of infinite iterators on potentially-computable methods
authorvarkor <github@varkor.com>
Thu, 18 Jan 2018 15:28:10 +0000 (15:28 +0000)
committervarkor <github@varkor.com>
Thu, 18 Jan 2018 15:28:10 +0000 (15:28 +0000)
commitfdfb964a821a2f61353146629977eecafc0aa947
treea87f92c1bb95bbba93736173c3f83c35e078314e
parentda569fa9ddf8369a9809184d43c600dc06bd4b4d
Document the behaviour of infinite iterators on potentially-computable methods

It’s not entirely clear from the current documentation what behaviour
calling a method such as `min` on an infinite iterator like `RangeFrom`
is. One might expect this to terminate, but in fact, for infinite
iterators, `min` is always nonterminating (at least in the standard
library). This adds a quick note about this behaviour for clarification.
src/libcore/iter/iterator.rs
src/libcore/iter/mod.rs