Fix Rust number parsing worklist ordering bug
authorJakob Cornell <jakob+gpg@jcornell.net>
Sun, 1 Oct 2023 18:41:48 +0000 (13:41 -0500)
committerJakob Cornell <jakob+gpg@jcornell.net>
Sun, 1 Oct 2023 18:41:48 +0000 (13:41 -0500)
sharedmodel/src/update_parse.rs

index 04495cb78fbae9de2866cb235c2c801bdfd315bd..5e3f0c9ef5d98798995cdf03e2e236e82cfcf23b 100644 (file)
@@ -56,7 +56,7 @@ pub fn parse_update(
        }
 
        // flatten the update content to plain text
-       let mut worklist: VecDeque<_> = body.contents().map(WorklistEntry::Node).collect();
+       let mut worklist: VecDeque<_> = body.contents().map(WorklistEntry::Node).rev().collect();
        let mut out = vec![vec![]];
 
        while let Some(entry) = worklist.pop_back() {