fn lower_row<T, U, F>(path: &Path, row: &[Field<T>], mut lower_value: F) -> Vec<Field<U>>
where
    F: FnMut(Path, &T) -> U,
{
    row.iter()
        .map(|item| {
            let item_path = path.append_child(item.name.0.clone());
            let ty = lower_value(item_path, &item.value);

            Field {
                doc: Rc::clone(&item.doc),
                name: item.name.clone(),
                value: ty,
            }
        })
        .collect()
}
/// Lower a row to the nominal IR, performing a lowering function for each value
///
/// # Arguments
///
/// * `path` - path to the parent struct or union
/// * `row` - the row of entries to be lowered
/// * `lower_value` - a function that will be called for each entry's
///    corresponding value, appending the name of the entry to `path`
Lower a row to the nominal IR, performing a lowering function for each value
Lower a row to the nominal IR performing a lowering function for each value
fn lower_row<T, U, F>(path: &Path, row: &[Field<T>], mut lower_value: F) -> Vec<Field<U>>
where
    F: FnMut(Path, &T) -> U,
{
    row.iter()
        .map(|item| {
            let item_path = path.append_child(item.name.0.clone());
            let ty = lower_value(item_path, &item.value);
            Field {
                doc: Rc::clone(&item.doc),
                name: item.name.clone(),
                value: ty,
            }
        })
        .collect()
}
fn lower_row < T , U , F > ( path : & Path , row : & [ Field < T > ] , mut lower_value : F ) -> Vec < Field < U > > where F : FnMut ( Path , & T ) -> U , { row . iter ( ) . map ( | item | { let item_path = path . append_child ( item . name . 0 . clone ( ) ) ; let ty = lower_value ( item_path , & item . value ) ; Field { doc : Rc :: clone ( & item . doc ) , name : item . name . clone ( ) , value : ty , } } ) . collect ( ) }
Lower a row to the nominal IR, performing a lowering function for each value
Lower a row to the nominal IR performing a lowering function for each value
path
&Path
row
&[Field<T>]
lower_value
F
path
&Path
row
&[Field<T>]
lower_value
F