fn parse_version(filename: &str) -> Vec<u32> {
    let version = if let Some(version) = filename.strip_prefix("libclang.so.") {
        version
    } else if filename.starts_with("libclang-") {
        &filename[9..filename.len() - 3]
    } else {
        return vec![];
    };

    version.split('.').map(|s| s.parse().unwrap_or(0)).collect()
}
/// Extracts the version components in a `libclang` shared library filename.

Extracts the version components in a `libclang` shared library filename.
Extracts the version components in a ` libclang ` shared library filename .
fn parse_version(filename: &str) -> Vec<u32> {
    let version = if let Some(version) = filename.strip_prefix("libclang.so.") {
        version
    } else if filename.starts_with("libclang-") {
        &filename[9..filename.len() - 3]
    } else {
        return vec![];
    };
    version.split('.').map(|s| s.parse().unwrap_or(0)).collect()
}
fn parse_version ( filename : & str ) -> Vec < u32 > { let version = if let Some ( version ) = filename . strip_prefix ( " " ) { version } else if filename . starts_with ( " " ) { & filename [ 9 .. filename . len ( ) - 3 ] } else { return vec ! [ ] ; } ; version . split ( '.' ) . map ( | s | s . parse ( ) . unwrap_or ( 0 ) ) . collect ( ) }
Extracts the version components in a `libclang` shared library filename.
Extracts the version components in a ` libclang ` shared library filename .
filename
&str