[wip] Committing before match refactor

This commit is contained in:
Adam Cooper 2022-01-21 08:53:35 -05:00
parent d00bc97478
commit e034933fc0

View file

@ -124,7 +124,7 @@ async fn get_folder_contents(url_tail: &str) -> Result<String, Box<dyn std::erro
fn traverse(queue: Vec<NextcloudResponse>) { fn traverse(queue: Vec<NextcloudResponse>) {
debug!("Entering: traverse()"); debug!("Entering: traverse()");
// Initialize the indexed "pointer" // Initialize the indexed "pointer"
let current_index: usize = 0; let mut current_index: usize = 0;
let mut already_visited: bool; let mut already_visited: bool;
// Initialize the hashmap of visited items (by etag?) // Initialize the hashmap of visited items (by etag?)
let mut visited_items = HashMap::new(); let mut visited_items = HashMap::new();
@ -135,10 +135,16 @@ fn traverse(queue: Vec<NextcloudResponse>) {
visited_items.insert(etag, true); visited_items.insert(etag, true);
() ()
}, },
_ => println!("something's happening"), _ => {
current_index += 1;
()
}
} }
}, },
_ => println!("something's happening"), _ => {
current_index +=1;
()
}
} }
// Depth first traversal // Depth first traversal
while !queue.is_empty() { while !queue.is_empty() {
@ -165,6 +171,7 @@ fn traverse(queue: Vec<NextcloudResponse>) {
}, },
_ => println!("something's happening"), _ => println!("something's happening"),
} }
current_index += 1;
} }
} }