[wip] Runs without panic, but doesn't actually update, apparently.

This commit is contained in:
Adam Cooper 2022-02-27 23:14:28 -05:00
parent 6292b5dddf
commit 7966f61894

View file

@ -143,8 +143,7 @@ async fn publicise_it(path: &String, password: &String) -> Result<bool, Box<dyn
Ok(true) Ok(true)
} }
#[tokio::main] async fn traverse(mut result: Multistatus, password: &String) -> Result<bool, Box<dyn std::error::Error>> {
async fn traverse(mut result: Multistatus, password: &String) {
debug!("Entering: traverse()"); debug!("Entering: traverse()");
// Initialize the indexed "pointer" // Initialize the indexed "pointer"
let mut current_index: usize = 0; let mut current_index: usize = 0;
@ -189,6 +188,7 @@ async fn traverse(mut result: Multistatus, password: &String) {
} }
current_index += 1; current_index += 1;
} }
Ok(true)
} }
fn get_password() -> Result<String, std::io::Error> { fn get_password() -> Result<String, std::io::Error> {
@ -230,6 +230,6 @@ async fn main() -> std::io::Result<()> {
let mut result: Multistatus = from_str(&folder_contents).unwrap(); let mut result: Multistatus = from_str(&folder_contents).unwrap();
println!("{:?}", result); println!("{:?}", result);
traverse(result, &password); let result: bool = traverse(result, &password).await.unwrap();
Ok(()) Ok(())
} }