mirror of
https://github.com/Dummi26/mers.git
synced 2025-12-25 16:06:32 +01:00
Added the concept of subtypes ...
... which `try` now uses to avoid some problems with inner types
This commit is contained in:
@@ -83,7 +83,7 @@ impl Config {
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct RunCommandError(String);
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RunCommandErrorT;
|
||||
impl MersData for RunCommandError {
|
||||
fn is_eq(&self, other: &dyn MersData) -> bool {
|
||||
@@ -116,6 +116,9 @@ impl MersType for RunCommandErrorT {
|
||||
fn is_included_in_single(&self, target: &dyn MersType) -> bool {
|
||||
self.is_same_type_as(target)
|
||||
}
|
||||
fn subtypes(&self, acc: &mut Type) {
|
||||
acc.add(Arc::new(self.clone()));
|
||||
}
|
||||
fn as_any(&self) -> &dyn std::any::Any {
|
||||
self
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user