fn parse_resource_name_from_lock(unmangled_name: String) -> Option<String> {
    // Currently all resource locks implement `rtic_core::Mutex` so we search for it
    let mut v: Vec<&str> = unmangled_name.split("impl rtic_core::Mutex for ").collect();
    if v.len() > 1 {
        match v.pop() {
            Some(string) => {
                let newsubstr: Vec<&str> = string.split(">::lock").collect();
                if newsubstr.is_empty() {
                    None
                } else {
                    Some(newsubstr[0].to_string())
                }
            }
            None => None,
        }
    } else {
        None
    }
}
/// Try to parse the name of the RTIC resource from its unmangled name in the DWARF format.
/// If the name is not an RTIC resource it will return `None`.
Try to parse the name of the RTIC resource from its unmangled name in the DWARF format.
If the name is not an RTIC resource it will return `None`.
Try to parse the name of the RTIC resource from its unmangled name in the DWARF format . If the name is not an RTIC resource it will return ` None ` .
fn parse_resource_name_from_lock(unmangled_name: String) -> Option<String> {
    // Currently all resource locks implement `rtic_core::Mutex` so we search for it
    let mut v: Vec<&str> = unmangled_name.split("impl rtic_core::Mutex for ").collect();
    if v.len() > 1 {
        match v.pop() {
            Some(string) => {
                let newsubstr: Vec<&str> = string.split(">::lock").collect();
                if newsubstr.is_empty() {
                    None
                } else {
                    Some(newsubstr[0].to_string())
                }
            }
            None => None,
        }
    } else {
        None
    }
}
fn parse_resource_name_from_lock ( unmangled_name : String ) -> Option < String > { // Currently all resource locks implement `rtic_core::Mutex` so we search for it let mut v : Vec < & str > = unmangled_name . split ( " " ) . collect ( ) ; if v . len ( ) > 1 { match v . pop ( ) { Some ( string ) => { let newsubstr : Vec < & str > = string . split ( " " ) . collect ( ) ; if newsubstr . is_empty ( ) { None } else { Some ( newsubstr [ 0 ] . to_string ( ) ) } } None => None , } } else { None } }
Try to parse the name of the RTIC resource from its unmangled name in the DWARF format.
Try to parse the name of the RTIC resource from its unmangled name in the DWARF format .
unmangled_name
String
unmangled_name
String