added ConvertStatus::success method
This commit is contained in:
1 parent
9f2b8f40fb
commit
cd56bf3e16
1 file changed
+7
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user