fn recurse_nested_comments(
            comments: &mut Vec<Comment>,
            comment_text: &mut Vec<String>,
            username: &Option<&str>,
        ) {
            for comment in comments {
                if username.is_none() || *username == Some(&comment.author.name) {
                    let new_comment = mem::take(&mut comment.text);
                    comment_text.push(new_comment);
                }
                recurse_nested_comments(&mut comment.replies, comment_text, username);
            }
        }
/// Helper function to recurse through comment replies
Helper function to recurse through comment replies
Helper function to recurse through comment replies
fn recurse_nested_comments(
            comments: &mut Vec<Comment>,
            comment_text: &mut Vec<String>,
            username: &Option<&str>,
        ) {
            for comment in comments {
                if username.is_none() || *username == Some(&comment.author.name) {
                    let new_comment = mem::take(&mut comment.text);
                    comment_text.push(new_comment);
                }
                recurse_nested_comments(&mut comment.replies, comment_text, username);
            }
        }
fn recurse_nested_comments ( comments : & mut Vec < Comment > , comment_text : & mut Vec < String > , username : & Option < & str > , ) { for comment in comments { if username . is_none ( ) || * username == Some ( & comment . author . name ) { let new_comment = mem :: take ( & mut comment . text ) ; comment_text . push ( new_comment ) ; } recurse_nested_comments ( & mut comment . replies , comment_text , username ) ; } }
Helper function to recurse through comment replies
Helper function to recurse through comment replies
comments
&mut Vec<Comment>
comment_text
&mut Vec<String>
username
&Option<&str>
comments
&mut Vec<Comment>
comment_text
&mut Vec<String>
username
&Option<&str>