Take reference to allow multiple uses of enum
This change updates the `get_worfklow` function, which takes an enum
to get the associated workflow, to take a reference to the enum argument
as it does not need ownership.
@@ -25,8 +25,8 @@ pub enum POWorkflow {
}
#[allow(dead_code)]
-pub fn get_workflow(name: POWorkflow) -> Option<Workflow> {
- match name {
+pub fn get_workflow(name: &POWorkflow) -> Option<Workflow> {
+ match *name {
POWorkflow::SystemOfRecord => Some(system_of_record_workflow()),
POWorkflow::Collaborative => Some(collaborative_workflow()),
}
