diff --git a/cpp/src/error.rs b/cpp/src/error.rs index c2fba11f..07545cdc 100644 --- a/cpp/src/error.rs +++ b/cpp/src/error.rs @@ -140,7 +140,7 @@ impl From for VerboseError { match value { GroupsPathError::UndefinedGroup(g) => Self::UndefinedGroupError(g), GroupsPathError::CycleFound(cycle) => Self::CyclicInteractionError(cycle), - GroupsPathError::PathfindingError(_) => Self::Other(Box::new(value)), + GroupsPathError::PathfindingError(_) | _ => Self::Other(Box::new(value)), } } } @@ -149,7 +149,7 @@ impl From for VerboseError { fn from(value: MetadataRetrievalError) -> Self { match value { MetadataRetrievalError::ConditionEvaluationError(e) => e.into(), - MetadataRetrievalError::RegexError(_) => Self::Other(Box::new(value)), + MetadataRetrievalError::RegexError(_) | _ => Self::Other(Box::new(value)), } } } diff --git a/python/src/error.rs b/python/src/error.rs index b0b8f864..aca857eb 100644 --- a/python/src/error.rs +++ b/python/src/error.rs @@ -68,7 +68,7 @@ impl From for VerboseError { match value { GroupsPathError::UndefinedGroup(g) => Self::UndefinedGroupError(g), GroupsPathError::CycleFound(cycle) => Self::CyclicInteractionError(cycle), - GroupsPathError::PathfindingError(_) => Self::Other(Box::new(value)), + GroupsPathError::PathfindingError(_) | _ => Self::Other(Box::new(value)), } } } diff --git a/src/database/error.rs b/src/database/error.rs index 74d1b83f..7e688687 100644 --- a/src/database/error.rs +++ b/src/database/error.rs @@ -24,6 +24,7 @@ impl From for ConditionEvaluationError { /// Represents an error that occurred while retrieving metadata for a plugin. #[derive(Debug)] +#[non_exhaustive] pub enum MetadataRetrievalError { ConditionEvaluationError(ConditionEvaluationError), RegexError(RegexError), diff --git a/src/sorting/error.rs b/src/sorting/error.rs index 4c37b4da..4161eca8 100644 --- a/src/sorting/error.rs +++ b/src/sorting/error.rs @@ -66,6 +66,7 @@ pub(crate) fn display_cycle(cycle: &[Vertex]) -> String { /// Represents an error that occurred while trying to get the path between two /// groups across the graph formed from group metadata. #[derive(Debug)] +#[non_exhaustive] pub enum GroupsPathError { UndefinedGroup(String), CycleFound(Vec),