{"id":33939392,"url":"https://github.com/nu11ptr/assert_unordered","last_synced_at":"2026-03-27T04:05:03.624Z","repository":{"id":57673777,"uuid":"481947330","full_name":"nu11ptr/assert_unordered","owner":"nu11ptr","description":"A direct replacement for `assert_eq` for unordered collections","archived":false,"fork":false,"pushed_at":"2022-04-17T21:13:11.000Z","size":74,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-16T23:53:34.058Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nu11ptr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-15T12:12:02.000Z","updated_at":"2025-08-26T23:12:49.000Z","dependencies_parsed_at":"2022-08-31T13:10:48.967Z","dependency_job_id":null,"html_url":"https://github.com/nu11ptr/assert_unordered","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nu11ptr/assert_unordered","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fassert_unordered","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fassert_unordered/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fassert_unordered/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fassert_unordered/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nu11ptr","download_url":"https://codeload.github.com/nu11ptr/assert_unordered/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fassert_unordered/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31018546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T03:51:26.850Z","status":"ssl_error","status_checked_at":"2026-03-27T03:51:09.693Z","response_time":164,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-12T15:27:08.666Z","updated_at":"2026-03-27T04:05:03.616Z","avatar_url":"https://github.com/nu11ptr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# assert_unordered\n\n[![Crate](https://img.shields.io/crates/v/assert_unordered)](https://crates.io/crates/assert_unordered)\n[![Docs](https://docs.rs/assert_unordered/badge.svg)](https://docs.rs/assert_unordered)\n\nA direct replacement for `assert_eq` for unordered collections\n\nThis macro is useful for any situation where the ordering of the collection doesn't matter, even\nif they are always in the same order. This is because the stdlib `assert_eq` shows the entire\ncollection for both left and right and leaves it up to the user to visually scan for differences.\nIn contrast, this crate only works with collections (types that implement `IntoIterator`) and\ntherefore can show only the differences (see below for an example of what the output looks like).\n\nNOTE: As of 0.3.2, the output by default is in color similar to `pretty_assertions`\n\n## Usage\n\nNOTE: `no-default-features` can be used to disable color output (and enable `no-std` support)\n\n```toml\n[dev-dependencies]\nassert_unordered = \"0.3\"\n```\n\n# Which Macro?\n\nTLDR; - favor `assert_eq_unordered_sort` unless the trait requirements can't be met\n\n* [assert_eq_unordered](https://docs.rs/assert_unordered/latest/assert_unordered/macro.assert_eq_unordered.html)\n    * Requires only `Debug` and `PartialEq` on the elements\n    * Collection level equality check, and if unequal, falls back to item by item compare (O(n^2))\n* [assert_eq_unordered_sort](https://docs.rs/assert_unordered/latest/assert_unordered/macro.assert_eq_unordered_sort.html)\n    * Requires `Debug`, `Eq` and `Ord` on the elements\n    * Collection level equality check, and if unequal, sorts and then compares again, \n      and if still unequal, falls back to item by item compare (O(n^2))\n\n\n## Example\n```rust, should_panic\nuse assert_unordered::assert_eq_unordered;\n\n#[derive(Debug, PartialEq)]\nstruct MyType(i32);\n\nfn main() {\n    let expected = vec![MyType(1), MyType(2), MyType(4), MyType(5)];\n    let actual = vec![MyType(2), MyType(0), MyType(4)];\n\n    assert_eq_unordered!(expected, actual);\n}\n```\n\nOutput:\n\n![example_error](example_error.png)\n\n## License\n\nThis project is licensed optionally under either:\n\n* Apache License, Version 2.0, (LICENSE-APACHE\n  or https://www.apache.org/licenses/LICENSE-2.0)\n* MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnu11ptr%2Fassert_unordered","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnu11ptr%2Fassert_unordered","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnu11ptr%2Fassert_unordered/lists"}