message: Simplify calculation of error shapes in `EventStreamTestTools.kt`
diff: @@ -34,7 +34,6 @@ import software.amazon.smithy.rust.codegen.core.testutil.EventStreamUnmarshallTe
  import software.amazon.smithy.rust.codegen.core.util.hasTrait
  import software.amazon.smithy.rust.codegen.core.util.lookup
  import software.amazon.smithy.rust.codegen.core.util.outputShape
  -import kotlin.streams.toList
  data class TestEventStreamProject(
  val model: Model,
  @@ -115,16 +114,13 @@ object EventStreamTestTools {
  val project = TestWorkspace.testProject(symbolProvider)
  val operationSymbol = symbolProvider.toSymbol(operationShape)
  project.withModule(ErrorsModule) {
  - val errors = model.shapes()
  - .filter { shape -> shape.isStructureShape && shape.hasTrait<ErrorTrait>() }
  - .map { it.asStructureShape().get() }
  - .toList()
  + val errors = model.structureShapes.filter { shape -> shape.hasTrait<ErrorTrait>() }
  when (codegenTarget) {
  CodegenTarget.CLIENT -> CombinedErrorGenerator(model, symbolProvider, operationSymbol, errors).render(this)
  CodegenTarget.SERVER -> ServerCombinedErrorGenerator(model, symbolProvider, operationSymbol, errors).render(this)
  }
  - for (shape in model.shapes().filter { shape -> shape is StructureShape && shape.hasTrait<ErrorTrait>() }) {
  - StructureGenerator(model, symbolProvider, this, shape as StructureShape).render(codegenTarget)
  + for (shape in model.structureShapes.filter { shape -> shape.hasTrait<ErrorTrait>() }) {
  + StructureGenerator(model, symbolProvider, this, shape).render(codegenTarget)
  requirements.renderBuilderForShape(this, codegenContext, shape)
  }
  }
  