pub fn theme_inherits(file_path: &Path) -> Option<String> {
    let mut content = String::new();
    let mut file = File::open(file_path).ok()?;
    file.read_to_string(&mut content).ok()?;

    let re = Regex::new(r"Inherits\s*=\s*([a-zA-Z0-9-_]+)").unwrap();
    let matches = re.captures_iter(&content).next()?;

    Some(String::from(&matches[1]))
}
/// Loads the specified index.theme file, and returns a Some with
/// the value of the Inherits key in it.
/// Returns None if the file cannot be read for any reason,
/// if the file cannot be parsed, or if the `Inherits` key is omitted.
Loads the specified index.theme file, and returns a Some with
the value of the Inherits key in it.
Returns None if the file cannot be read for any reason,
if the file cannot be parsed, or if the `Inherits` key is omitted.
Loads the specified index . theme file and returns a Some with the value of the Inherits key in it . Returns None if the file cannot be read for any reason if the file cannot be parsed or if the ` Inherits ` key is omitted .
pub fn theme_inherits(file_path: &Path) -> Option<String> {
    let mut content = String::new();
    let mut file = File::open(file_path).ok()?;
    file.read_to_string(&mut content).ok()?;
    let re = Regex::new(r"Inherits\s*=\s*([a-zA-Z0-9-_]+)").unwrap();
    let matches = re.captures_iter(&content).next()?;
    Some(String::from(&matches[1]))
}
pub fn theme_inherits ( file_path : & Path ) -> Option < String > { let mut content = String :: new ( ) ; let mut file = File :: open ( file_path ) . ok ( ) ? ; file . read_to_string ( & mut content ) . ok ( ) ? ; let re = Regex :: new ( r"Inherits\s*=\s*([a-zA-Z0-9-_]+)" ) . unwrap ( ) ; let matches = re . captures_iter ( & content ) . next ( ) ? ; Some ( String :: from ( & matches [ 1 ] ) ) }
Loads the specified index.theme file, and returns a Some with
the value of the Inherits key in it.
Loads the specified index . theme file and returns a Some with the value of the Inherits key in it .
file_path
&Path
file_path
&Path