Add more derived traits to enums and structs

This commit is contained in:
Oliver Hamlet
2025-02-26 19:45:33 +00:00
parent cf1dd29a2a
commit 08749f51ad
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -86,7 +86,7 @@ impl error::Error for Error {
}
}
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum MoreDataNeeded {
/// It's not known how much more data are needed
UnknownSize,
@@ -94,7 +94,7 @@ pub enum MoreDataNeeded {
Size(NonZeroUsize),
}
#[derive(Debug)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ParsingError<I: fmt::Debug + fmt::Display> {
input: I,
kind: ParsingErrorKind,
@@ -143,7 +143,7 @@ impl<I: fmt::Debug + fmt::Display> nom::error::ParseError<I> for ParsingError<I>
}
}
#[derive(Debug)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum ParsingErrorKind {
InvalidRegexSyntax(String),
InvalidRegexUnknown,
+1 -1
View File
@@ -11,7 +11,7 @@ pub mod parse;
mod path;
mod version;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum ComparisonOperator {
Equal,
NotEqual,
+1 -1
View File
@@ -22,7 +22,7 @@ use function::Function;
type ParsingResult<'a, T> = IResult<&'a str, T, ParsingError<&'a str>>;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[non_exhaustive]
pub enum GameType {
Oblivion,