fn compute_column_layout<'a>(visualization_data: &'a VisualizationData) -> (HashMap<&'a u64, TimelineColumnData>, i32) {
    let mut resource_owners_layout = HashMap::new();
    let mut x = 0;                   // Right-most Column x-offset.
    for (hash, timeline) in visualization_data.timelines.iter() {
        // only put variable in the column layout
        match timeline.resource_access_point {
            ResourceAccessPoint::Function(_) => {
                /* do nothing */
            },
            ResourceAccessPoint::Owner(_) | ResourceAccessPoint::MutRef(_) | ResourceAccessPoint::StaticRef(_) =>
            {
                let name = match visualization_data.get_name_from_hash(hash) {
                    Some(_name) => _name,
                    None => panic!("no matching resource owner for hash {}", hash),
                };
                let x_space = cmp::max(70, (&(name.len() as i64)-1)*13);
                x = x + x_space;
                let title = match visualization_data.is_mut(hash) {
                    true => String::from("mutable"),
                    false => String::from("immutable"),
                };
                resource_owners_layout.insert(hash, TimelineColumnData
                    { 
                        name: name.clone(), 
                        x_val: x, 
                        title: name.clone() + ", " + &title,
                    });
            }
        }
    }
    (resource_owners_layout, (x as i32)+100)
}
// Returns: a hashmap from the hash of the ResourceOwner to its Column information
a hashmap from the hash of the ResourceOwner to its Column information
a hashmap from the hash of the ResourceOwner to its Column information
fn compute_column_layout<'a>(visualization_data: &'a VisualizationData) -> (HashMap<&'a u64, TimelineColumnData>, i32) {
    let mut resource_owners_layout = HashMap::new();
    let mut x = 0;                   // Right-most Column x-offset.
    for (hash, timeline) in visualization_data.timelines.iter() {
        // only put variable in the column layout
        match timeline.resource_access_point {
            ResourceAccessPoint::Function(_) => {
                /* do nothing */
            },
            ResourceAccessPoint::Owner(_) | ResourceAccessPoint::MutRef(_) | ResourceAccessPoint::StaticRef(_) =>
            {
                let name = match visualization_data.get_name_from_hash(hash) {
                    Some(_name) => _name,
                    None => panic!("no matching resource owner for hash {}", hash),
                };
                let x_space = cmp::max(70, (&(name.len() as i64)-1)*13);
                x = x + x_space;
                let title = match visualization_data.is_mut(hash) {
                    true => String::from("mutable"),
                    false => String::from("immutable"),
                };
                resource_owners_layout.insert(hash, TimelineColumnData
                    { 
                        name: name.clone(), 
                        x_val: x, 
                        title: name.clone() + ", " + &title,
                    });
            }
        }
    }
    (resource_owners_layout, (x as i32)+100)
}
fn compute_column_layout < ' a > ( visualization_data : & ' a VisualizationData ) -> ( HashMap < & ' a u64 , TimelineColumnData > , i32 ) { let mut resource_owners_layout = HashMap :: new ( ) ; let mut x = 0 ; // Right-most Column x-offset. for ( hash , timeline ) in visualization_data . timelines . iter ( ) { // only put variable in the column layout match timeline . resource_access_point { ResourceAccessPoint :: Function ( _ ) => { /* do nothing */ } , ResourceAccessPoint :: Owner ( _ ) | ResourceAccessPoint :: MutRef ( _ ) | ResourceAccessPoint :: StaticRef ( _ ) => { let name = match visualization_data . get_name_from_hash ( hash ) { Some ( _name ) => _name , None => panic ! ( " " hash ) , } ; let x_space = cmp :: max ( 70 , ( & ( name . len ( ) as i64 ) - 1 ) * 13 ) ; x = x + x_space ; let title = match visualization_data . is_mut ( hash ) { true => String :: from ( " " ) , false => String :: from ( " " ) , } ; resource_owners_layout . insert ( hash , TimelineColumnData { name : name . clone ( ) , x_val : x , title : name . clone ( ) + " " + & title , } ) ; } } } ( resource_owners_layout , ( x as i32 ) + 100 ) }
Returns: a hashmap from the hash of the ResourceOwner to its Column information
Returns : a hashmap from the hash of the ResourceOwner to its Column information
visualization_data
&'a VisualizationData