File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -143,11 +143,7 @@ impl From<&models::TemplateBody> for ast::TemplateBody {
143
143
. as_ref ( )
144
144
. expect ( "resource_constraint field should exist" ) ,
145
145
) ,
146
- Some ( ast:: Expr :: from (
147
- v. non_scope_constraints
148
- . as_ref ( )
149
- . expect ( "non_scope_constraints field should exist" ) ,
150
- ) ) ,
146
+ v. non_scope_constraints . as_ref ( ) . map ( |e| ast:: Expr :: from ( e) ) ,
151
147
)
152
148
}
153
149
}
@@ -170,11 +166,7 @@ impl From<&ast::TemplateBody> for models::TemplateBody {
170
166
resource_constraint : Some ( models:: PrincipalOrResourceConstraint :: from (
171
167
v. resource_constraint ( ) ,
172
168
) ) ,
173
- non_scope_constraints : Some (
174
- v. non_scope_constraints ( )
175
- . map ( |e| models:: Expr :: from ( e) )
176
- . unwrap_or_else ( || models:: Expr :: from ( & ast:: Expr :: val ( true ) ) ) ,
177
- ) ,
169
+ non_scope_constraints : v. non_scope_constraints ( ) . map ( |e| models:: Expr :: from ( e) ) ,
178
170
}
179
171
}
180
172
}
You can’t perform that action at this time.
0 commit comments