INNER CODE UNIT · Rust

current_version_flag_count

zly2006/zhihu-plus-plus · aigc-vote-server/src/lib.rs:436

    fn current_version_flag_count(
        &self,
        content_type: &str,
        content_id: &str,
        content_hash: &str,
    ) -> i64 {
        self.flags
            .iter()
            .filter(|(key, record)| {
                key.content_type == content_type
                    && key.content_id == content_id
                    && record.content_hash == content_hash
            })
            .count() as i64
    }

    fn flag_voters(&self, content_type: &str, content_id: &str) -> Vec<AigcFlagVoter> {
        let mut voters = self

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…