awslabs / dynein

DynamoDB CLI written in Rust.
https://github.com/awslabs/dynein
Apache License 2.0
360 stars 37 forks source link

Remove unnecessary `vec!` from `create_temporary_table_with_items` invocations #238

Open StoneDot opened 4 months ago

StoneDot commented 4 months ago

Currently we typically use create_temporary_table_with_items with vec!. However, current implementation does not need to use vec! because of the improvement of #218. We can simplify the implementation of caller sides.

    pub async fn create_temporary_table_with_items<ItemIter>(
        &mut self,
        pk: &'static str,
        sk: Option<&'static str>,
        items: ItemIter,
    ) -> Result<String, Box<dyn std::error::Error>>
    where
        ItemIter: IntoIterator<Item = TemporaryItem>,