diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-30 16:26:15 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-30 16:26:15 -0800 |
| commit | a8820f7a2df1932918dbaa5d123486d86f7fb008 (patch) | |
| tree | e4d6d36b5710f4b707472017c823aefb14cfd960 /src/libcore | |
| parent | 899eb65b29bf666b05b155a3d4cc6002ac8cb26a (diff) | |
| parent | b7832ed0b42a2d6512e3f8d09605986237f02ed5 (diff) | |
| download | rust-a8820f7a2df1932918dbaa5d123486d86f7fb008.tar.gz rust-a8820f7a2df1932918dbaa5d123486d86f7fb008.zip | |
rollup merge of #20328: huonw/attack-of-the-clones
It's useful to be able to save state.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/char.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcore/char.rs b/src/libcore/char.rs index 9c12b3f68d3..f0151dda8d7 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -430,11 +430,13 @@ impl Char for char { /// An iterator over the characters that represent a `char`, as escaped by /// Rust's unicode escaping rules. +#[deriving(Clone)] pub struct EscapeUnicode { c: char, state: EscapeUnicodeState } +#[deriving(Clone)] enum EscapeUnicodeState { Backslash, Type, @@ -486,10 +488,12 @@ impl Iterator<char> for EscapeUnicode { /// An iterator over the characters that represent a `char`, escaped /// for maximum portability. +#[deriving(Clone)] pub struct EscapeDefault { state: EscapeDefaultState } +#[deriving(Clone)] enum EscapeDefaultState { Backslash(char), Char(char), @@ -513,4 +517,3 @@ impl Iterator<char> for EscapeDefault { } } } - |
