diff --git a/assert/src/tests.rs b/assert/src/tests.rs index f2a72d9..f7cf3f6 100644 --- a/assert/src/tests.rs +++ b/assert/src/tests.rs @@ -1274,7 +1274,7 @@ fn for_8() { #[test] fn nodes() { - use std::rc::Rc; + use std::sync::Arc; use environment::Environment; use label::Label; @@ -1321,10 +1321,10 @@ fn nodes() { let mut graph = petgraph::Graph::new(); let node_1 = graph.add_node(System::default()); let node_2 = graph.add_node(System::from( - Rc::new(Environment::default()), + Arc::new(Environment::default()), Set::from([2]), Process::Nill, - Rc::new(vec![]), + Arc::new(vec![]), )); let edge = graph.add_edge(node_1, node_2, Label::default()); diff --git a/rsprocess/src/process.rs b/rsprocess/src/process.rs index fa099ba..f926673 100644 --- a/rsprocess/src/process.rs +++ b/rsprocess/src/process.rs @@ -32,8 +32,9 @@ where // ----------------------------------------------------------------------------- -#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, Default)] pub enum Process { + #[default] Nill, RecursiveIdentifier { identifier: IdType, @@ -152,12 +153,6 @@ impl BasicProcess for Process { } } -impl Default for Process { - fn default() -> Self { - Self::Nill - } -} - impl PrintableWithTranslator for Process { fn print( &self, @@ -247,8 +242,9 @@ impl PrintableWithTranslator for Process { // ----------------------------------------------------------------------------- -#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, Default)] pub enum PositiveProcess { + #[default] Nill, RecursiveIdentifier { identifier: IdType, @@ -365,12 +361,6 @@ impl BasicProcess for PositiveProcess { } } -impl Default for PositiveProcess { - fn default() -> Self { - Self::Nill - } -} - impl PrintableWithTranslator for PositiveProcess { fn print( &self,