better Pos
This commit is contained in:
parent
bcefb1b68f
commit
651ccb9cba
11 changed files with 268 additions and 318 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use super::template::{DayTrait, ResultType};
|
||||
use nom::{error::Error, Err, IResult, Parser};
|
||||
use thiserror::Error;
|
||||
|
||||
const DAY_NUMBER: usize = todo!();
|
||||
|
|
@ -21,8 +22,14 @@ impl DayTrait for Day {
|
|||
|
||||
#[derive(Debug, Error)]
|
||||
enum DayError {
|
||||
#[error("Dummy")]
|
||||
Dummy,
|
||||
#[error("Not a valid description: {0}")]
|
||||
ParsingError(String),
|
||||
}
|
||||
|
||||
impl From<Err<Error<&str>>> for DayError {
|
||||
fn from(error: Err<Error<&str>>) -> Self {
|
||||
DayError::ParsingError(error.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue