You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: quality.rs
    path of file: ./repos/rust-music-theory/src/chord
    
    the code of the file until where you have to start completion: use crate::chord::errors::ChordError;
use lazy_static::lazy_static;
use regex::{Match, Regex};
use strum_macros::Display;

lazy_static! {
    static ref QUALITY_REGEXES: Vec<(Regex, Quality)> = {
        use Quality::*;

        vec![
            (
                Regex::new(r"^(M\s+|M$|(?i)maj|Maj|Major|major)").unwrap(),
                Maj
    
    pub fn from_regex(string: &str) -> Result<(Self, Option<Match>), ChordError> {
        use Quality::*;

        for (regex, quality_enum) in &*QUALITY_REGEXES {
            let mode = regex.find(string.trim());

            if let Some(quality_match) = mode {
                return Ok((*quality_enum, Some(quality_match)));
            };
        }

        Ok((Major, None))
    }