From 1ecfc2548f1dfe0aa2ec34fb174555a27f37dde0 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 9 Jul 2020 11:30:30 -0700 Subject: [PATCH] tags: Move impls below type definitions --- tags/src/lib.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tags/src/lib.rs b/tags/src/lib.rs index 7d58d99b..790b866a 100644 --- a/tags/src/lib.rs +++ b/tags/src/lib.rs @@ -63,15 +63,6 @@ pub enum Error { InvalidCapture(String), } -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match self { - Error::InvalidCapture(name) => write!(f, "Invalid capture @{}. Expected one of: @definition.*, @reference.*, @doc, @name, @local.(scope|definition|reference).", name), - _ => write!(f, "{:?}", self) - } - } -} - #[derive(Debug, Default)] struct PatternInfo { docs_adjacent_capture: Option, @@ -475,6 +466,15 @@ where } } +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self { + Error::InvalidCapture(name) => write!(f, "Invalid capture @{}. Expected one of: @definition.*, @reference.*, @doc, @name, @local.(scope|definition|reference).", name), + _ => write!(f, "{:?}", self) + } + } +} + impl From for Error { fn from(error: regex::Error) -> Self { Error::Regex(error)