Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamVenner committed Sep 6, 2023
1 parent 29070c8 commit 74d0a4e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions fastgmad-lib/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub struct FastGmadError {
pub kind: FastGmadErrorKind,

/// An optional context string
pub context: Option<String>
pub context: Option<String>,
}
impl std::fmt::Display for FastGmadError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
Expand Down Expand Up @@ -78,10 +78,7 @@ pub enum FastGmadErrorKind {
}
impl From<(PathBuf, std::io::Error)> for FastGmadErrorKind {
fn from((path, error): (PathBuf, std::io::Error)) -> Self {
Self::PathIoError {
path,
error,
}
Self::PathIoError { path, error }
}
}

Expand All @@ -96,7 +93,7 @@ macro_rules! fastgmad_error {
use crate::error::FastGmadErrorKind::*;
$kind.into()
},
context: Some($while.into())
context: Some($while.into()),
}
};

Expand All @@ -107,7 +104,7 @@ macro_rules! fastgmad_error {
use crate::error::FastGmadErrorKind::*;
$kind.into()
},
context: None
context: None,
}
};
}
Expand Down Expand Up @@ -175,4 +172,4 @@ macro_rules! fastgmad_io_error {
}
};
}
pub(crate) use fastgmad_io_error;
pub(crate) use fastgmad_io_error;

0 comments on commit 74d0a4e

Please sign in to comment.