Skip to content
This repository was archived by the owner on Oct 25, 2021. It is now read-only.
This repository was archived by the owner on Oct 25, 2021. It is now read-only.

Why is CreatureType a String instead of an enum? #100

Description

@agluszak

pub type CreatureType = String;

Why is CreatureType defined to be a String instead of an enum? An enum would be more typesafe. As far as I can see, it's only used for an enum-like comparison here:

if creature_type == "Carnivore" || creature_type == "Herbivore" {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions