// returns true if field names match tuple convention
// returns false if field names do not match tuple convention
returns true if field names match tuple convention
returns false if field names do not match tuple convention
returns true if field names match tuple convention returns false if field names do not match tuple convention
fn is_tuple(&self, fields: &(Vec<&'i str>, Vec<gimli::DebugInfoOffset>)) -> bool {
        const MAX_TUPLE: usize = 16;
        // if we have some fields, we may have found a tuple.
        // need to make sure
        if !fields.0.is_empty() && fields.0.len() <= MAX_TUPLE {
            // check that each field has the right format.
            // for now, rust encodes tuples in debuginfo as a struct with each field of the for __0, __1, etc.
            let tuple_names = (0..MAX_TUPLE)
                .map(|x| format!("__{}", x))
                .collect::<Vec<_>>();
            for (field, tup_field) in fields.0.iter().zip(tuple_names.iter()) {
                if field != tup_field {
                    // one of these fields does not match: its not a tuple
                    return false;
                }
            }
            return true;
        }
        return false;
    }
fn is_tuple ( & self , fields : & ( Vec < & ' i str > , Vec < gimli :: DebugInfoOffset > ) ) -> bool { const MAX_TUPLE : usize = 16 ; // if we have some fields, we may have found a tuple. // need to make sure if ! fields . 0 . is_empty ( ) && fields . 0 . len ( ) <= MAX_TUPLE { // check that each field has the right format. // for now, rust encodes tuples in debuginfo as a struct with each field of the for __0, __1, etc. let tuple_names = ( 0 .. MAX_TUPLE ) . map ( | x | format ! ( " " x ) ) . collect :: < Vec < _ > > ( ) ; for ( field , tup_field ) in fields . 0 . iter ( ) . zip ( tuple_names . iter ( ) ) { if field != tup_field { // one of these fields does not match: its not a tuple return false ; } } return true ; } return false ; }
returns true if field names match tuple convention
returns false if field names do not match tuple convention
returns true if field names match tuple convention returns false if field names do not match tuple convention
&self
fields
&(Vec<&'i str>, Vec<gimli::DebugInfoOffset>)