fn find_post_node(post_uuid: Uuid, post_tree: PostData) -> Option<PostData> {
            if post_tree.post.uuid == post_uuid {
                return Some(post_tree);
            } else {
                for child in post_tree.children {
                    if let Some(found_root) = find_post_node(post_uuid, child) {
                        return Some(found_root);
                    }
                }
                return None;
            }
        }
/// Recursive inner function to prune the tree to find the desired node among the larger post_tree.
Recursive inner function to prune the tree to find the desired node among the larger post_tree.
Recursive inner function to prune the tree to find the desired node among the larger post_tree .
fn find_post_node(post_uuid: Uuid, post_tree: PostData) -> Option<PostData> {
            if post_tree.post.uuid == post_uuid {
                return Some(post_tree);
            } else {
                for child in post_tree.children {
                    if let Some(found_root) = find_post_node(post_uuid, child) {
                        return Some(found_root);
                    }
                }
                return None;
            }
        }
fn find_post_node ( post_uuid : Uuid , post_tree : PostData ) -> Option < PostData > { if post_tree . post . uuid == post_uuid { return Some ( post_tree ) ; } else { for child in post_tree . children { if let Some ( found_root ) = find_post_node ( post_uuid , child ) { return Some ( found_root ) ; } } return None ; } }
Recursive inner function to prune the tree to find the desired node among the larger post_tree.
Recursive inner function to prune the tree to find the desired node among the larger post_tree .
post_uuid
Uuid
post_tree
PostData
post_uuid
Uuid
post_tree
PostData