aws-sdk-rust icon indicating copy to clipboard operation
aws-sdk-rust copied to clipboard

[request]: Consider not exposing `std::collections::HashMap`

Open carllerche opened this issue 3 years ago • 2 comments
trafficstars

Tell us about your request

I found std::collections::HashMap used as part of a number of public APIs. Doing so commits the hash algorithm to the public API. By default, Rust's HashMap uses a secure hash algorithm which comes at the expense of requiring more CPU cycles. If the hash algorithm is exposed as part of the public API, there will be no way to change it in the future.

Here is one place I found it: https://docs.rs/aws-sdk-dynamodb/latest/aws_sdk_dynamodb/client/fluent_builders/struct.PutItem.html#method.set_item

Tell us about the problem you're trying to solve.

Future proofing

Are you currently working around this issue?

N/A

Additional context

No response

carllerche avatar Dec 16 '21 21:12 carllerche