fn create_tag(&self, tags: &str, tag_entry: &TagEntry) -> Tag {
        let tag_type = tag_entry.to_tag_type();
        let category = match tag_type {
            TagType::General => {
                const CHARACTER_CATEGORY: u8 = 4;
                if tag_entry.category == CHARACTER_CATEGORY {
                    if tag_entry.post_count > 1500 {
                        TagCategory::General
                    } else {
                        TagCategory::Special
                    }
                } else {
                    TagCategory::General
                }
            }
            TagType::Artist => TagCategory::Special,
            _ => unreachable!(),
        };

        Tag::new(tags, category, tag_type)
    }
/// Processes the tag type and creates the appropriate tag for it.
Processes the tag type and creates the appropriate tag for it.
Processes the tag type and creates the appropriate tag for it .
fn create_tag(&self, tags: &str, tag_entry: &TagEntry) -> Tag {
        let tag_type = tag_entry.to_tag_type();
        let category = match tag_type {
            TagType::General => {
                const CHARACTER_CATEGORY: u8 = 4;
                if tag_entry.category == CHARACTER_CATEGORY {
                    if tag_entry.post_count > 1500 {
                        TagCategory::General
                    } else {
                        TagCategory::Special
                    }
                } else {
                    TagCategory::General
                }
            }
            TagType::Artist => TagCategory::Special,
            _ => unreachable!(),
        };
        Tag::new(tags, category, tag_type)
    }
fn create_tag ( & self , tags : & str , tag_entry : & TagEntry ) -> Tag { let tag_type = tag_entry . to_tag_type ( ) ; let category = match tag_type { TagType :: General => { const CHARACTER_CATEGORY : u8 = 4 ; if tag_entry . category == CHARACTER_CATEGORY { if tag_entry . post_count > 1500 { TagCategory :: General } else { TagCategory :: Special } } else { TagCategory :: General } } TagType :: Artist => TagCategory :: Special , _ => unreachable ! ( ) , } ; Tag :: new ( tags , category , tag_type ) }
Processes the tag type and creates the appropriate tag for it.
Processes the tag type and creates the appropriate tag for it .
&self
tags
&str
tag_entry
&TagEntry
&self
tags
&str
tag_entry
&TagEntry