pub fn add_feed(&mut self, to_add: Feed) {
        // We never add the same feed twice. To ensure that, we check that no feed has the same url
        let tested = self.feeds.clone();
        let already_existing: Vec<&Feed> = tested.iter().filter(|f| f.url == to_add.url).collect();
        if already_existing.is_empty() {
            self.feeds.push(to_add);
        } else {
            error!(
                "We already read this feed with the following configuration {:?}",
                already_existing
            );
        }
    }
/// If the feed url is not already in the store, adds it

If the feed url is not already in the store, adds it
If the feed url is not already in the store adds it
pub fn add_feed(&mut self, to_add: Feed) {
        // We never add the same feed twice. To ensure that, we check that no feed has the same url
        let tested = self.feeds.clone();
        let already_existing: Vec<&Feed> = tested.iter().filter(|f| f.url == to_add.url).collect();
        if already_existing.is_empty() {
            self.feeds.push(to_add);
        } else {
            error!(
                "We already read this feed with the following configuration {:?}",
                already_existing
            );
        }
    }
pub fn add_feed ( & mut self , to_add : Feed ) { // We never add the same feed twice. To ensure that, we check that no feed has the same url
 let tested = self . feeds . clone ( ) ; let already_existing : Vec < & Feed > = tested . iter ( ) . filter ( | f | f . url == to_add . url ) . collect ( ) ; if already_existing . is_empty ( ) { self . feeds . push ( to_add ) ; } else { error ! ( " " already_existing ) ; } }
If the feed url is not already in the store, adds it
If the feed url is not already in the store adds it
&mut self
to_add
Feed
&mut self
to_add
Feed