##// END OF EJS Templates
rust-discovery: use while loop instead of match + break...
Yuya Nishihara -
r43032:798b7d4b default
parent child Browse files
Show More
@@ -65,13 +65,7 b' where'
65 let mut visit: VecDeque<Revision> = heads.into_iter().collect();
65 let mut visit: VecDeque<Revision> = heads.into_iter().collect();
66 let mut factor: u32 = 1;
66 let mut factor: u32 = 1;
67 let mut seen: HashSet<Revision> = HashSet::new();
67 let mut seen: HashSet<Revision> = HashSet::new();
68 loop {
68 while let Some(current) = visit.pop_front() {
69 let current = match visit.pop_front() {
70 None => {
71 break;
72 }
73 Some(r) => r,
74 };
75 if !seen.insert(current) {
69 if !seen.insert(current) {
76 continue;
70 continue;
77 }
71 }
General Comments 0
You need to be logged in to leave comments. Login now