stellar / rs-soroban-sdk

Rust SDK for Soroban contracts.
Apache License 2.0
120 stars 69 forks source link

Move the Env testutil internal types into a single type #1234

Closed leighmcculloch closed 6 months ago

leighmcculloch commented 6 months ago

What

Move the Env testutil internal types into a single type.

Why

The Env when used with testutils enabled has a few internal fields. Those internal fields are copied around between MaybeEnv and Env, and because they're individual fields there's repetitive calls on each field, and repetitive compiler attributes. It's painful each time we add a new one to remember and find all the places that need adding. Using a single type groups all those repetitive actions so we don't need to keep repeating them for new types to add.

I'm about to add another field.