fn build_index_map(&mut self) {
        // NOTE: Keep the ordering the same as `into_expr`'s expansion would do!
        let args_len = self.args.len();
        self.arg_index_map.reserve(args_len);

        let mut sofar = 0usize;

        // Map the arguments
        for i in 0..args_len {
            let ref arg_types = self.arg_types[i];
            let arg_offsets = arg_types.iter().map(|offset| sofar + *offset).collect::<Vec<_>>();
            self.arg_index_map.push(arg_offsets);
            sofar += self.arg_unique_types[i].len();
        }

        // Record starting index for counts, which appear just after arguments
        self.count_args_index_offset = sofar;
    }
/// Builds the mapping between format placeholders and argument objects.
Builds the mapping between format placeholders and argument objects.
Builds the mapping between format placeholders and argument objects .
fn build_index_map(&mut self) {
        // NOTE: Keep the ordering the same as `into_expr`'s expansion would do!
        let args_len = self.args.len();
        self.arg_index_map.reserve(args_len);
        let mut sofar = 0usize;
        // Map the arguments
        for i in 0..args_len {
            let ref arg_types = self.arg_types[i];
            let arg_offsets = arg_types.iter().map(|offset| sofar + *offset).collect::<Vec<_>>();
            self.arg_index_map.push(arg_offsets);
            sofar += self.arg_unique_types[i].len();
        }
        // Record starting index for counts, which appear just after arguments
        self.count_args_index_offset = sofar;
    }
fn build_index_map ( & mut self ) { // NOTE: Keep the ordering the same as `into_expr`'s expansion would do! let args_len = self . args . len ( ) ; self . arg_index_map . reserve ( args_len ) ; let mut sofar = 0usize ; // Map the arguments for i in 0 .. args_len { let ref arg_types = self . arg_types [ i ] ; let arg_offsets = arg_types . iter ( ) . map ( | offset | sofar + * offset ) . collect :: < Vec < _ > > ( ) ; self . arg_index_map . push ( arg_offsets ) ; sofar += self . arg_unique_types [ i ] . len ( ) ; } // Record starting index for counts, which appear just after arguments self . count_args_index_offset = sofar ; }
Builds the mapping between format placeholders and argument objects.
Builds the mapping between format placeholders and argument objects .
&mut self
&mut self