From 45677eebf286a39c29d9cd789e76ea1cf2d2b1d0 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Fri, 22 Mar 2013 16:09:20 -0400 Subject: replace impls with `deriving` where applicable --- src/libcore/task/mod.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/libcore/task') diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs index a6646605b75..349a10bb809 100644 --- a/src/libcore/task/mod.rs +++ b/src/libcore/task/mod.rs @@ -72,21 +72,12 @@ pub enum Task { * If you wish for this result's delivery to block until all linked and/or * children tasks complete, recommend using a result future. */ +#[deriving(Eq)] pub enum TaskResult { Success, Failure, } -impl Eq for TaskResult { - fn eq(&self, other: &TaskResult) -> bool { - match ((*self), (*other)) { - (Success, Success) | (Failure, Failure) => true, - (Success, _) | (Failure, _) => false - } - } - fn ne(&self, other: &TaskResult) -> bool { !(*self).eq(other) } -} - /// Scheduler modes #[deriving(Eq)] pub enum SchedMode { -- cgit 1.4.1-3-g733a5