mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
Fixed reformatting
This commit is contained in:
@@ -14,7 +14,7 @@ use std::mem::transmute;
|
||||
|
||||
use crate::sys;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum AddMappingError {
|
||||
InvalidMapping(NulError),
|
||||
InvalidFilePath(String),
|
||||
|
||||
@@ -23,7 +23,7 @@ pub fn base_path() -> Result<String, String> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum PrefPathError {
|
||||
InvalidOrganizationName(NulError),
|
||||
InvalidApplicationName(NulError),
|
||||
|
||||
@@ -103,7 +103,7 @@ impl Into<MessageBoxColorScheme> for [sys::SDL_MessageBoxColor; 5] {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ShowMessageError {
|
||||
InvalidTitle(NulError),
|
||||
InvalidMessage(NulError),
|
||||
|
||||
+5
-5
@@ -56,11 +56,11 @@ use crate::sys::SDL_BlendMode;
|
||||
use crate::sys::SDL_TextureAccess;
|
||||
|
||||
/// Contains the description of an error returned by SDL
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SdlError(String);
|
||||
|
||||
/// Possible errors returned by targeting a `Canvas` to render to a `Texture`
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum TargetRenderError {
|
||||
SdlError(SdlError),
|
||||
NotSupported,
|
||||
@@ -732,7 +732,7 @@ impl CanvasBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum TextureValueError {
|
||||
WidthOverflows(u32),
|
||||
HeightOverflows(u32),
|
||||
@@ -1652,7 +1652,7 @@ impl Texture {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum UpdateTextureError {
|
||||
PitchOverflows(usize),
|
||||
PitchMustBeMultipleOfTwoForFormat(usize, PixelFormatEnum),
|
||||
@@ -1725,7 +1725,7 @@ impl Error for UpdateTextureError {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum UpdateTextureYUVError {
|
||||
PitchOverflows {
|
||||
plane: &'static str,
|
||||
|
||||
@@ -49,7 +49,7 @@ pub struct GlyphMetrics {
|
||||
pub type FontResult<T> = Result<T, FontError>;
|
||||
|
||||
/// A font-related error.
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum FontError {
|
||||
/// A Latin-1 encoded byte string is invalid.
|
||||
InvalidLatin1Text(NulError),
|
||||
|
||||
+1
-1
@@ -960,7 +960,7 @@ impl VideoSubsystem {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum WindowBuildError {
|
||||
HeightOverflows(u32),
|
||||
WidthOverflows(u32),
|
||||
|
||||
Reference in New Issue
Block a user