56
56
57
57
#![stable(feature = "rust1", since = "1.0.0")]
58
58
59
+
#[allow(deprecated)]
59
60
use self::MinMaxResult::*;
60
61
61
62
use clone::Clone;
@@ -445,6 +446,7 @@ pub trait Iterator {
445
446
/// ```
446
447
#[inline]
447
448
#[stable(feature = "rust1", since = "1.0.0")]
449
+
#[allow(deprecated)]
448
450
fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
449
451
where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option<B>,
450
452
{
@@ -840,6 +842,8 @@ pub trait Iterator {
840
842
#[unstable(feature = "iter_min_max",
841
843
reason = "return type may change or may wish to have a closure \
842
844
based version as well")]
845
+
#[deprecated(since = "1.3.0", reason = "has not proven itself")]
846
+
#[allow(deprecated)]
843
847
fn min_max(mut self) -> MinMaxResult<Self::Item> where Self: Sized, Self::Item: Ord
844
848
{
845
849
let (mut min, mut max) = match self.next() {
@@ -1336,6 +1340,8 @@ impl<I> RandomAccessIterator for Rev<I>
1336
1340
#[derive(Clone, PartialEq, Debug)]
1337
1341
#[unstable(feature = "iter_min_max",
1338
1342
reason = "unclear whether such a fine-grained result is widely useful")]
1343
+
#[deprecated(since = "1.3.0", reason = "has not proven itself")]
1344
+
#[allow(deprecated)]
1339
1345
pub enum MinMaxResult<T> {
1340
1346
/// Empty iterator
1341
1347
NoElements,
@@ -1349,6 +1355,8 @@ pub enum MinMaxResult<T> {
1349
1355
}
1350
1356
1351
1357
#[unstable(feature = "iter_min_max", reason = "type is unstable")]
1358
+
#[deprecated(since = "1.3.0", reason = "has not proven itself")]
1359
+
#[allow(deprecated)]
1352
1360
impl<T: Clone> MinMaxResult<T> {
1353
1361
/// `into_option` creates an `Option` of type `(T,T)`. The returned `Option`
1354
1362
/// has variant `None` if and only if the `MinMaxResult` has variant
@@ -2249,13 +2257,15 @@ impl<I> ExactSizeIterator for Take<I> where I: ExactSizeIterator {}
2249
2257
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
2250
2258
#[stable(feature = "rust1", since = "1.0.0")]
2251
2259
#[derive(Clone)]
2260
+
#[allow(deprecated)]
2252
2261
pub struct Scan<I, St, F> {
2253
2262
iter: I,
2254
2263
f: F,
2255
2264
2256
2265
/// The current internal state to be passed to the closure next.
2257
2266
#[unstable(feature = "scan_state",
2258
2267
reason = "public fields are otherwise rare in the stdlib")]
2268
+
#[deprecated(since = "1.3.0", reason = "unclear whether this is necessary")]
2259
2269
pub state: St,
2260
2270
}
2261
2271
@@ -2267,6 +2277,7 @@ impl<B, I, St, F> Iterator for Scan<I, St, F> where
2267
2277
type Item = B;
2268
2278
2269
2279
#[inline]
2280
+
#[allow(deprecated)]
2270
2281
fn next(&mut self) -> Option<B> {
2271
2282
self.iter.next().and_then(|a| (self.f)(&mut self.state, a))
2272
2283
}
@@ -2448,6 +2459,8 @@ impl<I> Fuse<I> {
2448
2459
/// previously returned `None`.
2449
2460
#[inline]
2450
2461
#[unstable(feature = "iter_reset_fuse", reason = "seems marginal")]
2462
+
#[deprecated(since = "1.3.0",
2463
+
reason = "unusual for adaptors to have one-off methods")]
2451
2464
pub fn reset_fuse(&mut self) {
2452
2465
self.done = false
2453
2466
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4