From f02ee42a869fea6fbfcea27b79fb71fbd5a055ec Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Tue, 26 Mar 2013 08:04:54 -0400 Subject: derive Eq and Clone impls where applicable --- src/libsyntax/parse/comments.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index 1b6b25db38a..e5685cdb4c7 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -20,13 +20,13 @@ use parse::lexer; use parse::token; use parse; -use core::cmp; use core::io::ReaderUtil; use core::io; use core::str; use core::uint; use core::vec; +#[deriving(Eq)] pub enum cmnt_style { isolated, // No code on either side of each line of the comment trailing, // Code exists to the left of the comment @@ -34,15 +34,6 @@ pub enum cmnt_style { blank_line, // Just a manual blank line "\n\n", for layout } -impl cmp::Eq for cmnt_style { - fn eq(&self, other: &cmnt_style) -> bool { - ((*self) as uint) == ((*other) as uint) - } - fn ne(&self, other: &cmnt_style) -> bool { - ((*self) as uint) != ((*other) as uint) - } -} - pub struct cmnt { style: cmnt_style, lines: ~[~str], -- cgit 1.4.1-3-g733a5