tags: Move impls below type definitions
This commit is contained in:
parent
b52f28d6d5
commit
1ecfc2548f
1 changed files with 9 additions and 9 deletions
|
|
@ -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<u32>,
|
||||
|
|
@ -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<regex::Error> for Error {
|
||||
fn from(error: regex::Error) -> Self {
|
||||
Error::Regex(error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue