From 7b17d68474fa28a1df1cb562ab153d8ef1376bd0 Mon Sep 17 00:00:00 2001 From: Kang Seonghoon Date: Tue, 7 Feb 2017 05:51:31 +0900 Subject: [PATCH] Fixed warnings in the nightly. --- src/format/mod.rs | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/format/mod.rs b/src/format/mod.rs index 360c3c5..efd6f76 100644 --- a/src/format/mod.rs +++ b/src/format/mod.rs @@ -101,11 +101,25 @@ pub enum Numeric { } /// An opaque type representing numeric item types for internal uses only. -#[derive(Clone, PartialEq, Eq)] pub struct InternalNumeric { _dummy: Void, } +impl Clone for InternalNumeric { + fn clone(&self) -> Self { + match self._dummy {} + } +} + +impl PartialEq for InternalNumeric { + fn eq(&self, _other: &InternalNumeric) -> bool { + match self._dummy {} + } +} + +impl Eq for InternalNumeric { +} + impl fmt::Debug for InternalNumeric { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "") @@ -188,11 +202,25 @@ pub enum Fixed { } /// An opaque type representing fixed-format item types for internal uses only. -#[derive(Clone, PartialEq, Eq)] pub struct InternalFixed { _dummy: Void, } +impl Clone for InternalFixed { + fn clone(&self) -> Self { + match self._dummy {} + } +} + +impl PartialEq for InternalFixed { + fn eq(&self, _other: &InternalFixed) -> bool { + match self._dummy {} + } +} + +impl Eq for InternalFixed { +} + impl fmt::Debug for InternalFixed { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "")