fn last_actors(tweets: &[String], n: usize) -> Vec<String> {
    let mut last_actors = Vec::new();
    for tweet in tweets.iter().take(n) {
        let actor = tweet
            .split(' ')
            .collect::<Vec<&str>>()
            .first()
            .expect("tweet is not in expected format")
            .replace("[", "")
            .replace("]", "");
        
        last_actors.push(actor);
    }
    
    info!("last {} actors to post: {:?}", n, last_actors);
    
    last_actors
}
/// Based on previous tweet history, find the last actor who tweeted
Based on previous tweet history, find the last actor who tweeted
Based on previous tweet history find the last actor who tweeted
fn last_actors(tweets: &[String], n: usize) -> Vec<String> {
    let mut last_actors = Vec::new();
    for tweet in tweets.iter().take(n) {
        let actor = tweet
            .split(' ')
            .collect::<Vec<&str>>()
            .first()
            .expect("tweet is not in expected format")
            .replace("[", "")
            .replace("]", "");
        last_actors.push(actor);
    }
    info!("last {} actors to post: {:?}", n, last_actors);
    last_actors
}
fn last_actors ( tweets : & [ String ] , n : usize ) -> Vec < String > { let mut last_actors = Vec :: new ( ) ; for tweet in tweets . iter ( ) . take ( n ) { let actor = tweet . split ( ' ' ) . collect :: < Vec < & str > > ( ) . first ( ) . expect ( " " ) . replace ( " " , " " ) . replace ( " " , " " ) ; last_actors . push ( actor ) ; } info ! ( " " n last_actors ) ; last_actors }
Based on previous tweet history, find the last actor who tweeted
Based on previous tweet history find the last actor who tweeted
tweets
&[String]
n
usize