added ConvertStatus::success method

This commit is contained in:
MaxOhn
2024-03-03 07:37:52 +01:00
parent 9f2b8f40fb
commit cd56bf3e16
+7
View File
@@ -75,3 +75,10 @@ pub enum ConvertStatus {
/// Conversion not possible.
Incompatible,
}
impl ConvertStatus {
/// Whether this [`ConvertStatus`] represents a success.
pub const fn success(self) -> bool {
matches!(self, Self::Noop | Self::Conversion)
}
}