diff options
| author | Steven Allen <steven@stebalien.com> | 2016-08-13 14:42:36 -0400 |
|---|---|---|
| committer | Steven Allen <steven@stebalien.com> | 2016-08-18 12:16:29 -0400 |
| commit | de91872a3337dddf9a0d27df7bfb64f3965c81b0 (patch) | |
| tree | 5204b54ce4d67aa5eb959f741167db6cba2f2454 /src/libstd/ascii.rs | |
| parent | 43c090ed69a624928c03ad61a29a59badf80ff7b (diff) | |
| download | rust-de91872a3337dddf9a0d27df7bfb64f3965c81b0.tar.gz rust-de91872a3337dddf9a0d27df7bfb64f3965c81b0.zip | |
Add a FusedIterator trait.
This trait can be used to avoid the overhead of a fuse wrapper when an iterator is already well-behaved. Conforming to: RFC 1581 Closes: #35602
Diffstat (limited to 'src/libstd/ascii.rs')
| -rw-r--r-- | src/libstd/ascii.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs index 0db91034eb5..070d7ca1eef 100644 --- a/src/libstd/ascii.rs +++ b/src/libstd/ascii.rs @@ -16,6 +16,7 @@ use prelude::v1::*; use mem; use ops::Range; +use iter::FusedIterator; /// Extension methods for ASCII-subset only operations on string slices. /// @@ -368,6 +369,9 @@ impl DoubleEndedIterator for EscapeDefault { } #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for EscapeDefault {} +#[unstable(feature = "fused", issue = "35602")] +impl FusedIterator for EscapeDefault {} + static ASCII_LOWERCASE_MAP: [u8; 256] = [ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
