diff --git a/src/rust/protover/protover.rs b/src/rust/protover/protover.rs index 11e9d0079e..f19f7972fd 100644 --- a/src/rust/protover/protover.rs +++ b/src/rust/protover/protover.rs @@ -429,8 +429,9 @@ fn find_range(list: &Vec) -> (bool, u32) { /// A `String` representation of this set in ascending order. /// fn contract_protocol_list<'a>(supported_set: &'a HashSet) -> String { - let mut supported_clone = supported_set.clone(); - let mut supported: Vec = supported_clone.drain().collect(); + let mut supported: Vec = supported_set.iter() + .map(|x| *x) + .collect(); supported.sort(); let mut final_output: Vec = Vec::new();