Use `std::result::Result` instead of `Result` (#4010)
When the model contains a shape by the name of `Result`, the generated code fails to compile. For instance the following model fails: ```smithy @restJson1 service ConstrainedService { operations: [SampleOperation] } @http(uri: "/anOperation", method: "POST") operation SampleOperation { output: SampleInputOutput input: SampleInputOutput errors: [ValidationException] } structure SampleInputOutput { result: Result } structure Result { @pattern("^a-z$") chat: String } ``` This PR ensures: 1. If `rustTemplate` is being used, then `#{Result}` is used 2. If `rust` is being used, then that is changed to `rustTemplate` and then `#{Result}` is used. 3. If `rustBlock` is being used, then the generated code should use `std::result::Result` --------- Co-authored-by:Fahad Zubair <fahadzub@amazon.com> Co-authored-by:
AWS SDK Rust Bot <aws-sdk-rust-primary@amazon.com> Co-authored-by:
Russell Cohen <rcoh@amazon.com> Co-authored-by:
david-perez <d@vidp.dev> Co-authored-by:
Landon James <lnj@amazon.com>
Loading
Please register or sign in to comment