Skip to content

Rename matcher Contains #45

Open
Open
@ianlet

Description

@ianlet

Currently, the matcher Contains is used to assert that a Vec contains multiple elements.

Would it be more appropriate to rename it ContainsElements or ContainsAllOf and have another matcher Contains to assert the presence of a single element in a Vec?

Something like:

assert_that!(vec!(1, 2, 3), contains_elements(vec!(1, 2)));
// or
assert_that!(vec!(1, 2, 3), contains_all_of(vec!(1, 2)));

and

assert_that!(vec!(1, 2, 3), contains(1));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions