validate: Remove ActionError::None type

It was useless.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1586>
This commit is contained in:
Thibault Saunier 2024-11-12 09:56:07 -03:00 committed by GStreamer Marge Bot
parent d8a3784b74
commit 4ceabe9400
2 changed files with 0 additions and 6 deletions

View file

@ -340,7 +340,6 @@ impl<'a> ActionTypeBuilder<'a> {
action.report_error(err); action.report_error(err);
ffi::GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED ffi::GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED
} }
Err(_) => panic!("New action error types should be handled here."),
Ok(v) => v.into_glib(), Ok(v) => v.into_glib(),
} }
} }

View file

@ -39,7 +39,6 @@ impl IntoGlib for ActionSuccess {
#[repr(i32)] #[repr(i32)]
pub enum ActionError { pub enum ActionError {
Error(String), Error(String),
None = ffi::GST_VALIDATE_EXECUTE_ACTION_NONE,
} }
impl ActionError { impl ActionError {
@ -49,7 +48,6 @@ impl ActionError {
ffi::GST_VALIDATE_EXECUTE_ACTION_ERROR => { ffi::GST_VALIDATE_EXECUTE_ACTION_ERROR => {
ActionError::Error("Execution failed".to_string()) ActionError::Error("Execution failed".to_string())
} }
ffi::GST_VALIDATE_EXECUTE_ACTION_NONE => ActionError::None,
_ => ActionError::Error("Unknown error".to_string()), _ => ActionError::Error("Unknown error".to_string()),
} }
} }
@ -62,7 +60,6 @@ impl IntoGlib for ActionError {
fn into_glib(self) -> ffi::GstValidateActionReturn { fn into_glib(self) -> ffi::GstValidateActionReturn {
match self { match self {
ActionError::Error(_) => ffi::GST_VALIDATE_EXECUTE_ACTION_ERROR, ActionError::Error(_) => ffi::GST_VALIDATE_EXECUTE_ACTION_ERROR,
ActionError::None => ffi::GST_VALIDATE_EXECUTE_ACTION_NONE,
} }
} }
} }
@ -135,7 +132,6 @@ impl ActionReturn {
Self::Error | Self::ErrorReported => { Self::Error | Self::ErrorReported => {
Err(ActionError::Error("Execution failed".to_string())) Err(ActionError::Error("Execution failed".to_string()))
} }
Self::None => Err(ActionError::None),
_ => Ok(unsafe { std::mem::transmute::<ActionReturn, ActionSuccess>(self) }), _ => Ok(unsafe { std::mem::transmute::<ActionReturn, ActionSuccess>(self) }),
} }
} }
@ -146,7 +142,6 @@ impl ActionReturn {
match v { match v {
ActionError::Error(_) => Self::Error, ActionError::Error(_) => Self::Error,
ActionError::None => Self::None,
} }
} }