fn find_new_messages(&self, feed:&Feed, sorted_messages:&[&Message])->(usize, usize, bool) {
        let head:usize = 0;
        let mut tail:usize = 0;
        let mut found = false;
        // Now do the filter
        // This part is not so easy.
        // we will first iterate over the various items and for each, check that
        // 1 - the message id is not the last read message one
        // 2 - if messages have dates, the message date is more recent than the last one
        for (position, message) in sorted_messages.iter().enumerate() {
            if !found {
                match &feed.last_message {
                    Some(id) => if id==&message.id {
                        tail = position; 
                        found = true;
                        break;
                    },
                    None => {}
                };
                if message.last_date<feed.last_updated {
                    tail = position; 
                    found = true;
                }
            }
        }
        (head, tail, found)
    }
/// Find in the given input feed the new messages
/// A message is considered new if it has a date which is nearer than feed last processed date
/// or (because RSS and Atom feeds may not have dates) if its id is not yet the id of the last
/// processed feed

Find in the given input feed the new messages
A message is considered new if it has a date which is nearer than feed last processed date
or (because RSS and Atom feeds may not have dates) if its id is not yet the id of the last
processed feed
Find in the given input feed the new messages A message is considered new if it has a date which is nearer than feed last processed date or ( because RSS and Atom feeds may not have dates ) if its id is not yet the id of the last processed feed
fn find_new_messages(&self, feed:&Feed, sorted_messages:&[&Message])->(usize, usize, bool) {
        let head:usize = 0;
        let mut tail:usize = 0;
        let mut found = false;
        // Now do the filter
        // This part is not so easy.
        // we will first iterate over the various items and for each, check that
        // 1 - the message id is not the last read message one
        // 2 - if messages have dates, the message date is more recent than the last one
        for (position, message) in sorted_messages.iter().enumerate() {
            if !found {
                match &feed.last_message {
                    Some(id) => if id==&message.id {
                        tail = position; 
                        found = true;
                        break;
                    },
                    None => {}
                };
                if message.last_date<feed.last_updated {
                    tail = position; 
                    found = true;
                }
            }
        }
        (head, tail, found)
    }
fn find_new_messages ( & self , feed : & Feed , sorted_messages : & [ & Message ] ) -> ( usize , usize , bool ) { let head : usize = 0 ; let mut tail : usize = 0 ; let mut found = false ; // Now do the filter
 // This part is not so easy.
 // we will first iterate over the various items and for each, check that
 // 1 - the message id is not the last read message one
 // 2 - if messages have dates, the message date is more recent than the last one
 for ( position , message ) in sorted_messages . iter ( ) . enumerate ( ) { if ! found { match & feed . last_message { Some ( id ) => if id == & message . id { tail = position ; found = true ; break ; } , None => { } } ; if message . last_date < feed . last_updated { tail = position ; found = true ; } } } ( head , tail , found ) }
Find in the given input feed the new messages
A message is considered new if it has a date which is nearer than feed last processed date
or (because RSS and Atom feeds may not have dates) if its id is not yet the id of the last
processed feed
Find in the given input feed the new messages A message is considered new if it has a date which is nearer than feed last processed date or ( because RSS and Atom feeds may not have dates ) if its id is not yet the id of the last processed feed
&self
feed
&Feed
sorted_messages
&[&Message]
&self
feed
&Feed
sorted_messages
&[&Message]