fn collect_models<'a>(
                model: &'a SmithyModel,
                s: &'a SmithyShape,
                models: &mut SmithyShapeSet<'a>,
            ) {
                for m in s.members.values() {
                    let shape = model.get_shape_of(m);
                    if shape.typ != SmithyType::Structure
                        && shape.typ != SmithyType::Union
                        && !shape.has_trait(SM_ENUM)
                    {
                        continue;
                    }
                    if models.contains_key(&shape.name) {
                        continue;
                    }
                    models.insert(shape.name.to_owned(), Some(shape));
                    collect_models(model, shape, models);
                }
            }
// collect all the shapes that get their own type in the generated model package
collect all the shapes that get their own type in the generated model package
collect all the shapes that get their own type in the generated model package
fn collect_models<'a>(
                model: &'a SmithyModel,
                s: &'a SmithyShape,
                models: &mut SmithyShapeSet<'a>,
            ) {
                for m in s.members.values() {
                    let shape = model.get_shape_of(m);
                    if shape.typ != SmithyType::Structure
                        && shape.typ != SmithyType::Union
                        && !shape.has_trait(SM_ENUM)
                    {
                        continue;
                    }
                    if models.contains_key(&shape.name) {
                        continue;
                    }
                    models.insert(shape.name.to_owned(), Some(shape));
                    collect_models(model, shape, models);
                }
            }
fn collect_models < ' a > ( model : & ' a SmithyModel , s : & ' a SmithyShape , models : & mut SmithyShapeSet < ' a > , ) { for m in s . members . values ( ) { let shape = model . get_shape_of ( m ) ; if shape . typ != SmithyType :: Structure && shape . typ != SmithyType :: Union && ! shape . has_trait ( SM_ENUM ) { continue ; } if models . contains_key ( & shape . name ) { continue ; } models . insert ( shape . name . to_owned ( ) , Some ( shape ) ) ; collect_models ( model , shape , models ) ; } }
collect all the shapes that get their own type in the generated model package
collect all the shapes that get their own type in the generated model package
model
&'a SmithyModel
s
&'a SmithyShape
models
&mut SmithyShapeSet<'a>
model
&'a SmithyModel
s
&'a SmithyShape
models
&mut SmithyShapeSet<'a>