]> git.lizzy.rs Git - rust.git/commitdiff
Derive traits for State.
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Wed, 19 Jul 2017 23:15:58 +0000 (01:15 +0200)
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Fri, 28 Jul 2017 13:46:27 +0000 (15:46 +0200)
src/libcore/ops/generator.rs

index 44b9835daf5f25cac0846b7e7f90523cb50e848e..5734e8008b7b9e4745663307ca7e26c0a7c051b4 100644 (file)
@@ -13,7 +13,7 @@
 /// This enum is returned from the `Generator::resume` method and indicates the
 /// possible return values of a generator. Currently this corresponds to either
 /// a suspension point (`Yielded`) or a termination point (`Complete`).
-#[derive(Debug)]
+#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
 #[cfg_attr(not(stage0), lang = "generator_state")]
 #[unstable(feature = "generator_trait", issue = "43122")]
 pub enum State<Y, R> {