From c515249861019db2317a1caab6f005571f623d52 Mon Sep 17 00:00:00 2001 From: ZengGengSen Date: Fri, 2 Feb 2024 19:03:08 +0800 Subject: [PATCH] style: fmt code fmt code --- src/sdl2/ttf/context.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sdl2/ttf/context.rs b/src/sdl2/ttf/context.rs index 47db82d454..4f0b8b950f 100644 --- a/src/sdl2/ttf/context.rs +++ b/src/sdl2/ttf/context.rs @@ -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, @@ -117,7 +117,9 @@ pub fn init<'ttf_module>() -> Result, 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())) }