fn remove_invalid_posts(&self, posts: &mut Vec<PostEntry>) -> u16 {
        // Sometimes, even if a post is available, the url for it isn't;
        // To handle this, the vector will retain only the posts that has an available url.
        let mut invalid_posts = 0;
        posts.retain(|e| {
            if !e.flags.deleted && e.file.url != None {
                true
            } else {
                invalid_posts += 1;
                false
            }
        });

        match invalid_posts.cmp(&1) {
            Ordering::Less => {}
            Ordering::Equal => {
                trace!(
                    "A post was filtered for being invalid (due to the user not being logged in)"
                );
                trace!("A post was filtered by e621...");
            }
            Ordering::Greater => {
                trace!("{} posts were filtered for being invalid (due to the user not being logged in)", invalid_posts);
                trace!("{} posts had to be filtered by e621/e926...", invalid_posts,);
            }
        }

        invalid_posts
    }
/// Removes invalid posts, this is dependant on if the file url is null or if the post was deleted.
Removes invalid posts, this is dependant on if the file url is null or if the post was deleted.
Removes invalid posts this is dependant on if the file url is null or if the post was deleted .
fn remove_invalid_posts(&self, posts: &mut Vec<PostEntry>) -> u16 {
        // Sometimes, even if a post is available, the url for it isn't;
        // To handle this, the vector will retain only the posts that has an available url.
        let mut invalid_posts = 0;
        posts.retain(|e| {
            if !e.flags.deleted && e.file.url != None {
                true
            } else {
                invalid_posts += 1;
                false
            }
        });
        match invalid_posts.cmp(&1) {
            Ordering::Less => {}
            Ordering::Equal => {
                trace!(
                    "A post was filtered for being invalid (due to the user not being logged in)"
                );
                trace!("A post was filtered by e621...");
            }
            Ordering::Greater => {
                trace!("{} posts were filtered for being invalid (due to the user not being logged in)", invalid_posts);
                trace!("{} posts had to be filtered by e621/e926...", invalid_posts,);
            }
        }
        invalid_posts
    }
fn remove_invalid_posts ( & self , posts : & mut Vec < PostEntry > ) -> u16 { // Sometimes, even if a post is available, the url for it isn't; // To handle this, the vector will retain only the posts that has an available url. let mut invalid_posts = 0 ; posts . retain ( | e | { if ! e . flags . deleted && e . file . url != None { true } else { invalid_posts += 1 ; false } } ) ; match invalid_posts . cmp ( & 1 ) { Ordering :: Less => { } Ordering :: Equal => { trace ! ( " " ) ; trace ! ( " " ) ; } Ordering :: Greater => { trace ! ( " " invalid_posts ) ; trace ! ( " " invalid_posts ) ; } } invalid_posts }
Removes invalid posts, this is dependant on if the file url is null or if the post was deleted.
Removes invalid posts this is dependant on if the file url is null or if the post was deleted .
&self
posts
&mut Vec<PostEntry>
&self
posts
&mut Vec<PostEntry>