[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
1 changed files with 3 additions and 3 deletions

View File

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