pub fn validate_comparison_name(&self, new: &str) -> ComparisonResult<()> {
        if new.starts_with("[Race]") {
            Err(ComparisonError::NameStartsWithRace)
        } else if self.comparisons().any(|c| c == new) {
            Err(ComparisonError::DuplicateName)
        } else {
            Ok(())
        }
    }
/// Checks a given name against the current comparisons in the Run to
/// ensure that it is valid for use.
Checks a given name against the current comparisons in the Run to
ensure that it is valid for use.
Checks a given name against the current comparisons in the Run to ensure that it is valid for use .
pub fn validate_comparison_name(&self, new: &str) -> ComparisonResult<()> {
        if new.starts_with("[Race]") {
            Err(ComparisonError::NameStartsWithRace)
        } else if self.comparisons().any(|c| c == new) {
            Err(ComparisonError::DuplicateName)
        } else {
            Ok(())
        }
    }
pub fn validate_comparison_name ( & self , new : & str ) -> ComparisonResult < ( ) > { if new . starts_with ( " " ) { Err ( ComparisonError :: NameStartsWithRace ) } else if self . comparisons ( ) . any ( | c | c == new ) { Err ( ComparisonError :: DuplicateName ) } else { Ok ( ( ) ) } }
Checks a given name against the current comparisons in the Run to
ensure that it is valid for use.
Checks a given name against the current comparisons in the Run to ensure that it is valid for use .
&self
new
&str
&self
new
&str