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