Skip to content

Add .map_async() to iterator #3813

@0xIO32

Description

@0xIO32

Adds the map_async() method to iterator.

It makes the following possible: (replace "0u16" with an useful function that needs async)

async fn test() -> Vec<u16> {
  [0u8].into_iter()
    .map_async(async |_| 0u16)
    .await
    .collect()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions