fmt
This commit is contained in:
@ -8,13 +8,18 @@ pub enum UserErrorTypes {
|
||||
impl Display for UserErrorTypes {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::NumberTooBigUsize =>
|
||||
write!(f, "Specified number is too big (greater than {})",
|
||||
usize::MAX),
|
||||
Self::NumberTooBigi64 =>
|
||||
write!(f, "Specified number is too big (lesser than {} or \
|
||||
| Self::NumberTooBigUsize => write!(
|
||||
f,
|
||||
"Specified number is too big (greater than {})",
|
||||
usize::MAX
|
||||
),
|
||||
| Self::NumberTooBigi64 => write!(
|
||||
f,
|
||||
"Specified number is too big (lesser than {} or \
|
||||
greater than {})",
|
||||
i64::MIN, i64::MAX),
|
||||
i64::MIN,
|
||||
i64::MAX
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ pub mod user_error {
|
||||
}
|
||||
|
||||
lalrpop_util::lalrpop_mod!(
|
||||
#[allow(clippy::uninlined_format_args)] pub grammar, // name of module
|
||||
#[allow(clippy::uninlined_format_args)]
|
||||
#[allow(clippy::type_complexity)] pub grammar, // name of module
|
||||
"/grammar.rs" // location of parser
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user