Skip to content

Commit

Permalink
style: fmt code
Browse files Browse the repository at this point in the history
    fmt code
  • Loading branch information
ZengGengSen committed Feb 2, 2024
1 parent fb230e4 commit c515249
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/sdl2/ttf/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub enum InitError {
AlreadyInitializedError,
}

impl error::Error for InitError {
impl error::Error for InitError {
fn cause(&self) -> Option<&dyn error::Error> {
match *self {
InitError::AlreadyInitializedError => None,
Expand All @@ -117,7 +117,9 @@ pub fn init<'ttf_module>() -> Result<Sdl2TtfContext<'ttf_module>, InitError> {
if ttf::TTF_WasInit() == 1 {
Err(InitError::AlreadyInitializedError)
} else if ttf::TTF_Init() == 0 {
Ok(Sdl2TtfContext { _phantom: std::marker::PhantomData })
Ok(Sdl2TtfContext {
_phantom: std::marker::PhantomData,
})
} else {
Err(InitError::InitializationError(io::Error::last_os_error()))
}
Expand Down

0 comments on commit c515249

Please sign in to comment.