code_ownership 2.0.0.pre.1 → 2.0.0.pre.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.cargo/config +2 -2
- data/Cargo.lock +22 -31
- data/ext/cargo-vendor/codeowners-0.2.17/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/codeowners-0.2.17/Cargo.lock +1257 -0
- data/ext/cargo-vendor/codeowners-0.2.17/Cargo.toml +111 -0
- data/ext/cargo-vendor/codeowners-0.2.17/README.md +287 -0
- data/ext/cargo-vendor/codeowners-0.2.17/dev/run_benchmarks_for_gv.sh +12 -0
- data/ext/cargo-vendor/codeowners-0.2.17/rust-toolchain.toml +4 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/cache/file.rs +179 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/cli.rs +129 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/common_test.rs +358 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/config.rs +126 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/crosscheck.rs +90 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/lib.rs +11 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/main.rs +43 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/ownership/codeowners_file_parser.rs +504 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/ownership/codeowners_query.rs +32 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/ownership/file_generator.rs +203 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/ownership/file_owner_resolver.rs +414 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/ownership/mapper/annotated_file_mapper.rs +158 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/ownership/mapper/package_mapper.rs +220 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/ownership/mapper.rs +249 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/ownership/validator.rs +218 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/ownership.rs +223 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/path_utils.rs +49 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/project.rs +229 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/project_builder.rs +337 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/project_file_builder.rs +107 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/runner/api.rs +141 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/runner/types.rs +37 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/runner.rs +390 -0
- data/ext/cargo-vendor/codeowners-0.2.17/src/tracked_files.rs +58 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/common/mod.rs +179 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/crosscheck_owners_test.rs +74 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/javascript_only_project/.github/CODEOWNERS +9 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/javascript_only_project/.keep +3 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/javascript_only_project/config/code_ownership.yml +12 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/javascript_only_project/config/teams/design.yml +7 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/javascript_only_project/config/teams/frontend.yml +6 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/javascript_only_project/frontend/apps/public/index.tsx +6 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/javascript_only_project/frontend/packages/dashboard/package.json +9 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/javascript_only_project/frontend/packages/dashboard/src/index.tsx +6 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/javascript_only_project/frontend/packages/ui-kit/.codeowner +3 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/javascript_only_project/frontend/packages/ui-kit/src/button.tsx +5 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/multiple-directory-owners/config/code_ownership.yml +10 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project/.github/CODEOWNERS +41 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project/config/code_ownership.yml +10 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project/javascript/packages/list/page-admin.tsx +1 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project/ruby/app/models/payroll.rb +3 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project/ruby/app/views/foos/edit.erb +1 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project/ruby/app/views/foos/index.html.erb +1 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project/ruby/app/views/foos/new.html.erb +1 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/.github/CODEOWNERS +53 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/config/code_ownership.yml +10 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/config/teams/brewers.yml +11 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/config/teams/cubs.yml +9 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/config/teams/giants.yml +8 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/config/teams/rockies.yml +8 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/frontend/packages/components/datepicker/package.json +5 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/frontend/packages/components/datepicker/src/picks/dp.tsx +3 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/frontend/packages/components/list/package.json +5 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/frontend/packages/components/list/src/item.tsx +3 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/frontend/packages/components/textfield/package.json +5 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/frontend/packages/components/textfield/src/field.tsx +3 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/frontend/packages/components/textfield/src/fields/small.tsx +3 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/gems/apollo/lib/apollo.rb +6 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/gems/ivy/lib/ivy.rb +6 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/gems/lager/lib/lager.rb +6 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/gems/summit/lib/summit.rb +6 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/packs/games/package.yml +1 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/packs/locations/app/services/capacity.rb +0 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/packs/locations/package.yml +1 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/packs/schedule/app/services/date.rb +0 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/packs/schedule/package.yml +1 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/ruby/app/brewers/lib/util.rb +3 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/ruby/app/brewers/services/play.rb +9 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/ruby/app/cubs/.codeowner +3 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/ruby/app/cubs/services/models/.codeowner +1 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/ruby/app/cubs/services/models/db/price.rb +5 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/ruby/app/cubs/services/models/entertainment.rb +0 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/ruby/app/cubs/services/play.rb +5 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/ruby/app/giants/services/play.rb +0 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/ruby/app/rockies/services/play.rb +0 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/invalid_project_test.rs +144 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/multiple_directory_owners_test.rs +41 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/runner_api.rs +181 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/untracked_files_test.rs +38 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/valid_project_test.rs +348 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tests/valid_project_with_overrides_test.rs +38 -0
- data/ext/cargo-vendor/codeowners-0.2.17/tmp/.gitkeep +0 -0
- data/ext/cargo-vendor/glob-0.3.3/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/glob-0.3.3/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/glob-0.3.3/.github/workflows/rust.yml +99 -0
- data/ext/cargo-vendor/glob-0.3.3/CHANGELOG.md +44 -0
- data/ext/cargo-vendor/glob-0.3.3/Cargo.lock +107 -0
- data/ext/cargo-vendor/glob-0.3.3/Cargo.toml +45 -0
- data/ext/cargo-vendor/glob-0.3.3/Cargo.toml.orig +18 -0
- data/ext/cargo-vendor/glob-0.3.3/README.md +38 -0
- data/ext/cargo-vendor/glob-0.3.3/src/lib.rs +1511 -0
- data/ext/cargo-vendor/glob-0.3.3/tests/glob-std.rs +477 -0
- data/ext/cargo-vendor/indexmap-2.11.0/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/indexmap-2.11.0/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/indexmap-2.11.0/.github/workflows/ci.yml +165 -0
- data/ext/cargo-vendor/indexmap-2.11.0/Cargo.lock +243 -0
- data/ext/cargo-vendor/indexmap-2.11.0/Cargo.toml +148 -0
- data/ext/cargo-vendor/indexmap-2.11.0/Cargo.toml.orig +62 -0
- data/ext/cargo-vendor/indexmap-2.11.0/RELEASES.md +575 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/lib.rs +290 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/map/core/entry.rs +625 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/map/core.rs +764 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/map/mutable.rs +165 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/map/slice.rs +800 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/map/tests.rs +1312 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/map.rs +1832 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/rayon/map.rs +686 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/rayon/set.rs +777 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/set/mutable.rs +86 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/set/slice.rs +427 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/set/tests.rs +1060 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/set.rs +1454 -0
- data/ext/cargo-vendor/indexmap-2.11.0/src/sval.rs +36 -0
- data/ext/cargo-vendor/indexmap-2.11.0/tests/quick.rs +894 -0
- data/ext/cargo-vendor/rayon-1.11.0/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/rayon-1.11.0/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/rayon-1.11.0/Cargo.lock +318 -0
- data/ext/cargo-vendor/rayon-1.11.0/Cargo.toml +130 -0
- data/ext/cargo-vendor/rayon-1.11.0/Cargo.toml.orig +57 -0
- data/ext/cargo-vendor/rayon-1.11.0/FAQ.md +213 -0
- data/ext/cargo-vendor/rayon-1.11.0/README.md +150 -0
- data/ext/cargo-vendor/rayon-1.11.0/RELEASES.md +922 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/array.rs +85 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/collections/binary_heap.rs +129 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/collections/btree_map.rs +66 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/collections/btree_set.rs +52 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/collections/hash_map.rs +93 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/collections/hash_set.rs +79 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/collections/linked_list.rs +66 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/collections/mod.rs +84 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/collections/vec_deque.rs +159 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/blocks.rs +129 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/chain.rs +258 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/chunks.rs +216 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/cloned.rs +219 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/collect/mod.rs +114 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/collect/test.rs +368 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/copied.rs +219 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/empty.rs +108 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/enumerate.rs +128 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/filter.rs +137 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/filter_map.rs +141 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/find_first_last/mod.rs +230 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/find_first_last/test.rs +102 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/flat_map.rs +153 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/flat_map_iter.rs +145 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/flatten.rs +134 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/flatten_iter.rs +124 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/fold.rs +289 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/fold_chunks.rs +224 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/fold_chunks_with.rs +220 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/from_par_iter.rs +280 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/inspect.rs +253 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/interleave.rs +326 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/interleave_shortest.rs +80 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/intersperse.rs +401 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/len.rs +262 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/map.rs +255 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/map_with.rs +565 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/mod.rs +3627 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/multizip.rs +335 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/once.rs +70 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/panic_fuse.rs +338 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/par_bridge.rs +157 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/plumbing/mod.rs +476 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/positions.rs +133 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/repeat.rs +295 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/rev.rs +119 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/skip.rs +93 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/skip_any.rs +140 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/skip_any_while.rs +162 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/splitter.rs +172 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/step_by.rs +135 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/take.rs +84 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/take_any.rs +140 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/take_any_while.rs +162 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/test.rs +2392 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/try_fold.rs +282 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/unzip.rs +524 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/update.rs +323 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/walk_tree.rs +524 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/while_some.rs +150 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/zip.rs +153 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/iter/zip_eq.rs +67 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/lib.rs +156 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/math.rs +25 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/option.rs +197 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/range.rs +457 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/range_inclusive.rs +381 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/result.rs +132 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/slice/chunk_by.rs +239 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/slice/chunks.rs +387 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/slice/mod.rs +1242 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/slice/rchunks.rs +385 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/slice/sort.rs +1686 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/slice/test.rs +216 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/str.rs +1005 -0
- data/ext/cargo-vendor/rayon-1.11.0/src/vec.rs +292 -0
- data/ext/cargo-vendor/rayon-1.11.0/tests/clones.rs +222 -0
- data/ext/cargo-vendor/rayon-1.11.0/tests/collect.rs +113 -0
- data/ext/cargo-vendor/rayon-1.11.0/tests/debug.rs +233 -0
- data/ext/cargo-vendor/rayon-1.11.0/tests/named-threads.rs +25 -0
- data/ext/cargo-vendor/rayon-1.11.0/tests/producer_split_at.rs +386 -0
- data/ext/cargo-vendor/rayon-1.11.0/tests/sort-panic-safe.rs +164 -0
- data/ext/cargo-vendor/rayon-1.11.0/tests/str.rs +122 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/Cargo.lock +309 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/Cargo.toml +93 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/Cargo.toml.orig +35 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/README.md +11 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/broadcast/mod.rs +150 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/join/mod.rs +186 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/join/test.rs +150 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/latch.rs +457 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/lib.rs +864 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/registry.rs +1002 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/scope/mod.rs +773 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/scope/test.rs +621 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/sleep/README.md +219 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/sleep/counters.rs +273 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/sleep/mod.rs +324 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/spawn/mod.rs +163 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/spawn/test.rs +255 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/test.rs +200 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/thread_pool/mod.rs +502 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/src/thread_pool/test.rs +418 -0
- data/ext/cargo-vendor/rayon-core-1.13.0/tests/use_current_thread.rs +57 -0
- data/ext/cargo-vendor/serde_json-1.0.143/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/serde_json-1.0.143/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/serde_json-1.0.143/.github/workflows/ci.yml +156 -0
- data/ext/cargo-vendor/serde_json-1.0.143/Cargo.lock +419 -0
- data/ext/cargo-vendor/serde_json-1.0.143/Cargo.toml +157 -0
- data/ext/cargo-vendor/serde_json-1.0.143/Cargo.toml.orig +91 -0
- data/ext/cargo-vendor/serde_json-1.0.143/src/lib.rs +438 -0
- data/ext/cargo-vendor/serde_json-1.0.143/src/map.rs +1181 -0
- data/ext/cargo-vendor/serde_json-1.0.143/src/ser.rs +2285 -0
- data/ext/cargo-vendor/serde_json-1.0.143/src/value/de.rs +1507 -0
- data/ext/cargo-vendor/tempfile-3.21.0/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/tempfile-3.21.0/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/tempfile-3.21.0/.github/workflows/ci.yml +109 -0
- data/ext/cargo-vendor/tempfile-3.21.0/CHANGELOG.md +364 -0
- data/ext/cargo-vendor/tempfile-3.21.0/Cargo.lock +196 -0
- data/ext/cargo-vendor/tempfile-3.21.0/Cargo.toml +98 -0
- data/ext/cargo-vendor/tempfile-3.21.0/Cargo.toml.orig +47 -0
- data/ext/cargo-vendor/winapi-util-0.1.10/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/winapi-util-0.1.10/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/winapi-util-0.1.10/.github/FUNDING.yml +1 -0
- data/ext/cargo-vendor/winapi-util-0.1.10/Cargo.lock +83 -0
- data/ext/cargo-vendor/winapi-util-0.1.10/Cargo.toml +54 -0
- data/ext/cargo-vendor/winapi-util-0.1.10/Cargo.toml.orig +25 -0
- data/ext/code_ownership/Cargo.toml +9 -9
- data/ext/code_ownership/src/lib.rs +40 -6
- data/lib/code_ownership/cli.rb +5 -18
- data/lib/code_ownership/private/for_file_output_builder.rb +83 -0
- data/lib/code_ownership/private/team_finder.rb +21 -7
- data/lib/code_ownership/version.rb +1 -1
- data/lib/code_ownership.rb +173 -6
- metadata +513 -706
- data/ext/cargo-vendor/codeowners-0.2.7/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/codeowners-0.2.7/Cargo.lock +0 -1230
- data/ext/cargo-vendor/codeowners-0.2.7/Cargo.toml +0 -95
- data/ext/cargo-vendor/codeowners-0.2.7/README.md +0 -204
- data/ext/cargo-vendor/codeowners-0.2.7/dev/run_benchmarks_for_gv.sh +0 -13
- data/ext/cargo-vendor/codeowners-0.2.7/rust-toolchain.toml +0 -4
- data/ext/cargo-vendor/codeowners-0.2.7/src/cache/file.rs +0 -181
- data/ext/cargo-vendor/codeowners-0.2.7/src/cli.rs +0 -119
- data/ext/cargo-vendor/codeowners-0.2.7/src/common_test.rs +0 -338
- data/ext/cargo-vendor/codeowners-0.2.7/src/config.rs +0 -118
- data/ext/cargo-vendor/codeowners-0.2.7/src/lib.rs +0 -8
- data/ext/cargo-vendor/codeowners-0.2.7/src/main.rs +0 -43
- data/ext/cargo-vendor/codeowners-0.2.7/src/ownership/file_generator.rs +0 -203
- data/ext/cargo-vendor/codeowners-0.2.7/src/ownership/for_file_fast.rs +0 -425
- data/ext/cargo-vendor/codeowners-0.2.7/src/ownership/mapper/package_mapper.rs +0 -220
- data/ext/cargo-vendor/codeowners-0.2.7/src/ownership/mapper/team_file_mapper.rs +0 -123
- data/ext/cargo-vendor/codeowners-0.2.7/src/ownership/mapper.rs +0 -249
- data/ext/cargo-vendor/codeowners-0.2.7/src/ownership/parser.rs +0 -486
- data/ext/cargo-vendor/codeowners-0.2.7/src/ownership/tests.rs +0 -219
- data/ext/cargo-vendor/codeowners-0.2.7/src/ownership/validator.rs +0 -218
- data/ext/cargo-vendor/codeowners-0.2.7/src/ownership.rs +0 -220
- data/ext/cargo-vendor/codeowners-0.2.7/src/project.rs +0 -229
- data/ext/cargo-vendor/codeowners-0.2.7/src/project_builder.rs +0 -319
- data/ext/cargo-vendor/codeowners-0.2.7/src/project_file_builder.rs +0 -75
- data/ext/cargo-vendor/codeowners-0.2.7/src/runner.rs +0 -312
- data/ext/cargo-vendor/codeowners-0.2.7/tests/common/mod.rs +0 -113
- data/ext/cargo-vendor/codeowners-0.2.7/tests/fixtures/multiple-directory-owners/config/code_ownership.yml +0 -10
- data/ext/cargo-vendor/codeowners-0.2.7/tests/fixtures/valid_project/.github/CODEOWNERS +0 -37
- data/ext/cargo-vendor/codeowners-0.2.7/tests/fixtures/valid_project/config/code_ownership.yml +0 -10
- data/ext/cargo-vendor/codeowners-0.2.7/tests/fixtures/valid_project/ruby/app/models/payroll.rb +0 -3
- data/ext/cargo-vendor/codeowners-0.2.7/tests/invalid_project_test.rs +0 -90
- data/ext/cargo-vendor/codeowners-0.2.7/tests/multiple_directory_owners_test.rs +0 -35
- data/ext/cargo-vendor/codeowners-0.2.7/tests/valid_project_test.rs +0 -284
- data/ext/cargo-vendor/glob-0.3.2/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/glob-0.3.2/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/glob-0.3.2/.github/workflows/rust.yml +0 -65
- data/ext/cargo-vendor/glob-0.3.2/CHANGELOG.md +0 -33
- data/ext/cargo-vendor/glob-0.3.2/Cargo.lock +0 -107
- data/ext/cargo-vendor/glob-0.3.2/Cargo.toml +0 -45
- data/ext/cargo-vendor/glob-0.3.2/Cargo.toml.orig +0 -19
- data/ext/cargo-vendor/glob-0.3.2/README.md +0 -37
- data/ext/cargo-vendor/glob-0.3.2/src/lib.rs +0 -1501
- data/ext/cargo-vendor/glob-0.3.2/tests/glob-std.rs +0 -474
- data/ext/cargo-vendor/indexmap-2.10.0/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/indexmap-2.10.0/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/indexmap-2.10.0/.github/workflows/ci.yml +0 -159
- data/ext/cargo-vendor/indexmap-2.10.0/Cargo.lock +0 -236
- data/ext/cargo-vendor/indexmap-2.10.0/Cargo.toml +0 -142
- data/ext/cargo-vendor/indexmap-2.10.0/Cargo.toml.orig +0 -61
- data/ext/cargo-vendor/indexmap-2.10.0/RELEASES.md +0 -563
- data/ext/cargo-vendor/indexmap-2.10.0/src/lib.rs +0 -288
- data/ext/cargo-vendor/indexmap-2.10.0/src/map/core/entry.rs +0 -574
- data/ext/cargo-vendor/indexmap-2.10.0/src/map/core.rs +0 -735
- data/ext/cargo-vendor/indexmap-2.10.0/src/map/mutable.rs +0 -165
- data/ext/cargo-vendor/indexmap-2.10.0/src/map/slice.rs +0 -751
- data/ext/cargo-vendor/indexmap-2.10.0/src/map/tests.rs +0 -1228
- data/ext/cargo-vendor/indexmap-2.10.0/src/map.rs +0 -1697
- data/ext/cargo-vendor/indexmap-2.10.0/src/rayon/map.rs +0 -662
- data/ext/cargo-vendor/indexmap-2.10.0/src/rayon/set.rs +0 -755
- data/ext/cargo-vendor/indexmap-2.10.0/src/set/mutable.rs +0 -86
- data/ext/cargo-vendor/indexmap-2.10.0/src/set/slice.rs +0 -380
- data/ext/cargo-vendor/indexmap-2.10.0/src/set/tests.rs +0 -999
- data/ext/cargo-vendor/indexmap-2.10.0/src/set.rs +0 -1340
- data/ext/cargo-vendor/indexmap-2.10.0/tests/quick.rs +0 -800
- data/ext/cargo-vendor/rayon-1.10.0/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/rayon-1.10.0/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/rayon-1.10.0/Cargo.toml +0 -61
- data/ext/cargo-vendor/rayon-1.10.0/Cargo.toml.orig +0 -39
- data/ext/cargo-vendor/rayon-1.10.0/FAQ.md +0 -227
- data/ext/cargo-vendor/rayon-1.10.0/README.md +0 -151
- data/ext/cargo-vendor/rayon-1.10.0/RELEASES.md +0 -909
- data/ext/cargo-vendor/rayon-1.10.0/src/array.rs +0 -85
- data/ext/cargo-vendor/rayon-1.10.0/src/collections/binary_heap.rs +0 -120
- data/ext/cargo-vendor/rayon-1.10.0/src/collections/btree_map.rs +0 -66
- data/ext/cargo-vendor/rayon-1.10.0/src/collections/btree_set.rs +0 -52
- data/ext/cargo-vendor/rayon-1.10.0/src/collections/hash_map.rs +0 -96
- data/ext/cargo-vendor/rayon-1.10.0/src/collections/hash_set.rs +0 -80
- data/ext/cargo-vendor/rayon-1.10.0/src/collections/linked_list.rs +0 -66
- data/ext/cargo-vendor/rayon-1.10.0/src/collections/mod.rs +0 -84
- data/ext/cargo-vendor/rayon-1.10.0/src/collections/vec_deque.rs +0 -159
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/blocks.rs +0 -131
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/chain.rs +0 -267
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/chunks.rs +0 -224
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/cloned.rs +0 -223
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/collect/mod.rs +0 -116
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/collect/test.rs +0 -373
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/copied.rs +0 -223
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/empty.rs +0 -104
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/enumerate.rs +0 -133
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/filter.rs +0 -141
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/filter_map.rs +0 -142
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/find_first_last/mod.rs +0 -230
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/find_first_last/test.rs +0 -105
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/flat_map.rs +0 -154
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/flat_map_iter.rs +0 -147
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/flatten.rs +0 -140
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/flatten_iter.rs +0 -132
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/fold.rs +0 -302
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/fold_chunks.rs +0 -236
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/fold_chunks_with.rs +0 -231
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/from_par_iter.rs +0 -310
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/inspect.rs +0 -257
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/interleave.rs +0 -335
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/interleave_shortest.rs +0 -85
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/intersperse.rs +0 -410
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/len.rs +0 -270
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/map.rs +0 -259
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/map_with.rs +0 -573
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/mod.rs +0 -3656
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/multizip.rs +0 -338
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/once.rs +0 -68
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/panic_fuse.rs +0 -342
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/par_bridge.rs +0 -159
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/plumbing/mod.rs +0 -483
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/positions.rs +0 -137
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/repeat.rs +0 -241
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/rev.rs +0 -123
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/skip.rs +0 -94
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/skip_any.rs +0 -144
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/skip_any_while.rs +0 -166
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/splitter.rs +0 -174
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/step_by.rs +0 -141
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/take.rs +0 -85
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/take_any.rs +0 -144
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/take_any_while.rs +0 -166
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/test.rs +0 -2333
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/try_fold.rs +0 -298
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/unzip.rs +0 -525
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/update.rs +0 -327
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/walk_tree.rs +0 -529
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/while_some.rs +0 -154
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/zip.rs +0 -158
- data/ext/cargo-vendor/rayon-1.10.0/src/iter/zip_eq.rs +0 -72
- data/ext/cargo-vendor/rayon-1.10.0/src/lib.rs +0 -160
- data/ext/cargo-vendor/rayon-1.10.0/src/math.rs +0 -54
- data/ext/cargo-vendor/rayon-1.10.0/src/option.rs +0 -203
- data/ext/cargo-vendor/rayon-1.10.0/src/range.rs +0 -454
- data/ext/cargo-vendor/rayon-1.10.0/src/range_inclusive.rs +0 -381
- data/ext/cargo-vendor/rayon-1.10.0/src/result.rs +0 -132
- data/ext/cargo-vendor/rayon-1.10.0/src/slice/chunk_by.rs +0 -244
- data/ext/cargo-vendor/rayon-1.10.0/src/slice/chunks.rs +0 -388
- data/ext/cargo-vendor/rayon-1.10.0/src/slice/mergesort.rs +0 -755
- data/ext/cargo-vendor/rayon-1.10.0/src/slice/mod.rs +0 -1226
- data/ext/cargo-vendor/rayon-1.10.0/src/slice/quicksort.rs +0 -902
- data/ext/cargo-vendor/rayon-1.10.0/src/slice/rchunks.rs +0 -386
- data/ext/cargo-vendor/rayon-1.10.0/src/slice/test.rs +0 -216
- data/ext/cargo-vendor/rayon-1.10.0/src/str.rs +0 -1010
- data/ext/cargo-vendor/rayon-1.10.0/src/vec.rs +0 -283
- data/ext/cargo-vendor/rayon-1.10.0/tests/clones.rs +0 -222
- data/ext/cargo-vendor/rayon-1.10.0/tests/collect.rs +0 -113
- data/ext/cargo-vendor/rayon-1.10.0/tests/debug.rs +0 -233
- data/ext/cargo-vendor/rayon-1.10.0/tests/named-threads.rs +0 -25
- data/ext/cargo-vendor/rayon-1.10.0/tests/producer_split_at.rs +0 -391
- data/ext/cargo-vendor/rayon-1.10.0/tests/sort-panic-safe.rs +0 -167
- data/ext/cargo-vendor/rayon-1.10.0/tests/str.rs +0 -119
- data/ext/cargo-vendor/rayon-core-1.12.1/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/rayon-core-1.12.1/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/rayon-core-1.12.1/Cargo.toml +0 -88
- data/ext/cargo-vendor/rayon-core-1.12.1/Cargo.toml.orig +0 -68
- data/ext/cargo-vendor/rayon-core-1.12.1/README.md +0 -11
- data/ext/cargo-vendor/rayon-core-1.12.1/src/broadcast/mod.rs +0 -150
- data/ext/cargo-vendor/rayon-core-1.12.1/src/join/mod.rs +0 -188
- data/ext/cargo-vendor/rayon-core-1.12.1/src/join/test.rs +0 -151
- data/ext/cargo-vendor/rayon-core-1.12.1/src/latch.rs +0 -461
- data/ext/cargo-vendor/rayon-core-1.12.1/src/lib.rs +0 -875
- data/ext/cargo-vendor/rayon-core-1.12.1/src/registry.rs +0 -996
- data/ext/cargo-vendor/rayon-core-1.12.1/src/scope/mod.rs +0 -769
- data/ext/cargo-vendor/rayon-core-1.12.1/src/scope/test.rs +0 -619
- data/ext/cargo-vendor/rayon-core-1.12.1/src/sleep/README.md +0 -219
- data/ext/cargo-vendor/rayon-core-1.12.1/src/sleep/counters.rs +0 -277
- data/ext/cargo-vendor/rayon-core-1.12.1/src/sleep/mod.rs +0 -325
- data/ext/cargo-vendor/rayon-core-1.12.1/src/spawn/mod.rs +0 -163
- data/ext/cargo-vendor/rayon-core-1.12.1/src/spawn/test.rs +0 -255
- data/ext/cargo-vendor/rayon-core-1.12.1/src/test.rs +0 -200
- data/ext/cargo-vendor/rayon-core-1.12.1/src/thread_pool/mod.rs +0 -508
- data/ext/cargo-vendor/rayon-core-1.12.1/src/thread_pool/test.rs +0 -418
- data/ext/cargo-vendor/rayon-core-1.12.1/tests/use_current_thread.rs +0 -57
- data/ext/cargo-vendor/serde_json-1.0.142/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/serde_json-1.0.142/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/serde_json-1.0.142/.github/workflows/ci.yml +0 -158
- data/ext/cargo-vendor/serde_json-1.0.142/Cargo.lock +0 -419
- data/ext/cargo-vendor/serde_json-1.0.142/Cargo.toml +0 -157
- data/ext/cargo-vendor/serde_json-1.0.142/Cargo.toml.orig +0 -91
- data/ext/cargo-vendor/serde_json-1.0.142/src/lib.rs +0 -438
- data/ext/cargo-vendor/serde_json-1.0.142/src/map.rs +0 -1174
- data/ext/cargo-vendor/serde_json-1.0.142/src/ser.rs +0 -2285
- data/ext/cargo-vendor/serde_json-1.0.142/src/value/de.rs +0 -1500
- data/ext/cargo-vendor/tempfile-3.20.0/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/tempfile-3.20.0/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/tempfile-3.20.0/.github/workflows/ci.yml +0 -107
- data/ext/cargo-vendor/tempfile-3.20.0/CHANGELOG.md +0 -360
- data/ext/cargo-vendor/tempfile-3.20.0/Cargo.lock +0 -183
- data/ext/cargo-vendor/tempfile-3.20.0/Cargo.toml +0 -98
- data/ext/cargo-vendor/tempfile-3.20.0/Cargo.toml.orig +0 -47
- data/ext/cargo-vendor/winapi-util-0.1.9/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/winapi-util-0.1.9/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/winapi-util-0.1.9/Cargo.toml +0 -53
- data/ext/cargo-vendor/winapi-util-0.1.9/Cargo.toml.orig +0 -25
- data/ext/cargo-vendor/windows-sys-0.59.0/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/windows-sys-0.59.0/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/windows-sys-0.59.0/Cargo.toml +0 -298
- data/ext/cargo-vendor/windows-sys-0.59.0/Cargo.toml.orig +0 -274
- data/ext/cargo-vendor/windows-sys-0.59.0/license-apache-2.0 +0 -201
- data/ext/cargo-vendor/windows-sys-0.59.0/license-mit +0 -21
- data/ext/cargo-vendor/windows-sys-0.59.0/readme.md +0 -87
- data/ext/cargo-vendor/windows-sys-0.59.0/rustfmt.toml +0 -2
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/Devices/Bluetooth/mod.rs +0 -32
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/Devices/HumanInterfaceDevice/mod.rs +0 -39
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/Devices/mod.rs +0 -4
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/Foundation/mod.rs +0 -1317
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/Graphics/Direct3D/mod.rs +0 -9170
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/Graphics/mod.rs +0 -2
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/NetworkManagement/Ndis/mod.rs +0 -3892
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/NetworkManagement/WindowsFilteringPlatform/mod.rs +0 -269
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/NetworkManagement/mod.rs +0 -4
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/Storage/FileSystem/Minifilters/mod.rs +0 -1392
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/Storage/FileSystem/mod.rs +0 -4503
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/Storage/mod.rs +0 -2
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/System/IO/mod.rs +0 -2
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/System/Memory/mod.rs +0 -11
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/System/OfflineRegistry/mod.rs +0 -28
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/System/Registry/mod.rs +0 -180
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/System/SystemInformation/mod.rs +0 -18
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/System/SystemServices/mod.rs +0 -13663
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/System/Threading/mod.rs +0 -155
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/System/mod.rs +0 -14
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Wdk/mod.rs +0 -12
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Data/HtmlHelp/mod.rs +0 -447
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Data/RightsManagement/mod.rs +0 -237
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Data/mod.rs +0 -4
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/AllJoyn/mod.rs +0 -1273
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/BiometricFramework/mod.rs +0 -1481
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/Bluetooth/mod.rs +0 -1419
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/Communication/mod.rs +0 -312
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs +0 -3969
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/DeviceQuery/mod.rs +0 -141
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/Display/mod.rs +0 -3141
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs +0 -96
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/Enumeration/mod.rs +0 -2
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/Fax/mod.rs +0 -1203
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs +0 -3684
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/PortableDevices/mod.rs +0 -1999
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/Properties/mod.rs +0 -261
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/Pwm/mod.rs +0 -73
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/Sensors/mod.rs +0 -687
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/SerialCommunication/mod.rs +0 -230
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/Tapi/mod.rs +0 -3217
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/Usb/mod.rs +0 -2694
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs +0 -660
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Devices/mod.rs +0 -36
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Foundation/mod.rs +0 -10318
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Gaming/mod.rs +0 -99
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Globalization/mod.rs +0 -5135
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Graphics/Dwm/mod.rs +0 -232
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Graphics/Gdi/mod.rs +0 -3857
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Graphics/GdiPlus/mod.rs +0 -2307
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Graphics/Hlsl/mod.rs +0 -2
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Graphics/OpenGL/mod.rs +0 -1276
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Graphics/Printing/PrintTicket/mod.rs +0 -28
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Graphics/Printing/mod.rs +0 -4147
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Graphics/mod.rs +0 -12
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Management/MobileDeviceManagementRegistration/mod.rs +0 -101
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Management/mod.rs +0 -2
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Media/Audio/mod.rs +0 -2052
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Media/DxMediaObjects/mod.rs +0 -94
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Media/KernelStreaming/mod.rs +0 -5281
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Media/Multimedia/mod.rs +0 -6442
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Media/Streaming/mod.rs +0 -117
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs +0 -910
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Media/mod.rs +0 -187
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs +0 -1926
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/Dns/mod.rs +0 -1564
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/InternetConnectionWizard/mod.rs +0 -22
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs +0 -3004
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/Multicast/mod.rs +0 -59
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/Ndis/mod.rs +0 -3334
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/NetBios/mod.rs +0 -211
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs +0 -4814
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/NetShell/mod.rs +0 -160
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs +0 -222
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/P2P/mod.rs +0 -1196
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/QoS/mod.rs +0 -1447
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/Rras/mod.rs +0 -3212
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/Snmp/mod.rs +0 -381
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/WNet/mod.rs +0 -363
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/WebDav/mod.rs +0 -47
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/WiFi/mod.rs +0 -4311
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs +0 -119
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs +0 -3818
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs +0 -281
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/WindowsNetworkVirtualization/mod.rs +0 -104
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/NetworkManagement/mod.rs +0 -42
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Networking/ActiveDirectory/mod.rs +0 -2383
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Networking/Clustering/mod.rs +0 -3900
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Networking/HttpServer/mod.rs +0 -1239
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Networking/Ldap/mod.rs +0 -817
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Networking/WebSocket/mod.rs +0 -88
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Networking/WinHttp/mod.rs +0 -1109
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Networking/WinInet/mod.rs +0 -2168
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Networking/WinSock/mod.rs +0 -4786
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Networking/WindowsWebServices/mod.rs +0 -3480
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Networking/mod.rs +0 -18
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/AppLocker/mod.rs +0 -172
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/Authentication/Identity/mod.rs +0 -5701
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/Authentication/mod.rs +0 -2
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/Authorization/mod.rs +0 -984
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/Credentials/mod.rs +0 -797
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/Cryptography/Catalog/mod.rs +0 -151
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs +0 -2315
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/Cryptography/Sip/mod.rs +0 -155
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/Cryptography/UI/mod.rs +0 -545
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/Cryptography/mod.rs +0 -8528
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs +0 -156
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/DirectoryServices/mod.rs +0 -19
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/EnterpriseData/mod.rs +0 -36
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs +0 -998
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/Isolation/mod.rs +0 -20
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/LicenseProtection/mod.rs +0 -8
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/NetworkAccessProtection/mod.rs +0 -149
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/WinTrust/mod.rs +0 -863
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/WinWlx/mod.rs +0 -335
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Security/mod.rs +0 -1156
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/Cabinets/mod.rs +0 -209
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/CloudFilters/mod.rs +0 -666
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/Compression/mod.rs +0 -36
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/DistributedFileSystem/mod.rs +0 -342
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/FileHistory/mod.rs +0 -97
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/FileSystem/mod.rs +0 -3699
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/Imapi/mod.rs +0 -697
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/IndexServer/mod.rs +0 -279
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs +0 -331
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/IscsiDisc/mod.rs +0 -1291
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/Jet/mod.rs +0 -2593
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/Nvme/mod.rs +0 -3428
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/OfflineFiles/mod.rs +0 -276
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/OperationRecorder/mod.rs +0 -20
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/Packaging/Appx/mod.rs +0 -377
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/Packaging/mod.rs +0 -2
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs +0 -246
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/StructuredStorage/mod.rs +0 -3
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/Vhd/mod.rs +0 -720
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/Xps/mod.rs +0 -415
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Storage/mod.rs +0 -38
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/AddressBook/mod.rs +0 -938
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Antimalware/mod.rs +0 -112
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs +0 -2145
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/ApplicationVerifier/mod.rs +0 -58
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/ClrHosting/mod.rs +0 -322
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Com/Marshal/mod.rs +0 -172
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Com/StructuredStorage/mod.rs +0 -655
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Com/Urlmon/mod.rs +0 -905
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Com/mod.rs +0 -1227
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/ComponentServices/mod.rs +0 -574
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Console/mod.rs +0 -373
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/CorrelationVector/mod.rs +0 -15
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/DataExchange/mod.rs +0 -428
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/DeploymentServices/mod.rs +0 -565
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/DeveloperLicensing/mod.rs +0 -3
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Diagnostics/Ceip/mod.rs +0 -1
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Diagnostics/Debug/Extensions/mod.rs +0 -3710
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Diagnostics/Debug/mod.rs +0 -5557
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Diagnostics/Etw/mod.rs +0 -2042
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Diagnostics/ProcessSnapshotting/mod.rs +0 -293
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Diagnostics/ToolHelp/mod.rs +0 -119
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Diagnostics/TraceLogging/mod.rs +0 -105
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Diagnostics/mod.rs +0 -12
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs +0 -308
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Environment/mod.rs +0 -202
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/ErrorReporting/mod.rs +0 -393
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/EventCollector/mod.rs +0 -117
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/EventLog/mod.rs +0 -379
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/EventNotificationService/mod.rs +0 -35
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/GroupPolicy/mod.rs +0 -424
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/HostCompute/mod.rs +0 -1
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/HostComputeNetwork/mod.rs +0 -86
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/HostComputeSystem/mod.rs +0 -171
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Hypervisor/mod.rs +0 -1983
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/IO/mod.rs +0 -53
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Iis/mod.rs +0 -1411
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Ioctl/mod.rs +0 -6216
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/JobObjects/mod.rs +0 -434
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Js/mod.rs +0 -154
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Kernel/mod.rs +0 -295
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/LibraryLoader/mod.rs +0 -106
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Mailslots/mod.rs +0 -6
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Mapi/mod.rs +0 -150
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Memory/NonVolatile/mod.rs +0 -20
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Memory/mod.rs +0 -464
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/MessageQueuing/mod.rs +0 -712
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/MixedReality/mod.rs +0 -14
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Ole/mod.rs +0 -2599
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/PasswordManagement/mod.rs +0 -22
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Performance/HardwareCounterProfiling/mod.rs +0 -27
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Performance/mod.rs +0 -1091
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Pipes/mod.rs +0 -42
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Power/mod.rs +0 -1413
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/ProcessStatus/mod.rs +0 -200
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Recovery/mod.rs +0 -15
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Registry/mod.rs +0 -1114
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/RemoteDesktop/mod.rs +0 -1771
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/RemoteManagement/mod.rs +0 -935
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/RestartManager/mod.rs +0 -86
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Restore/mod.rs +0 -66
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Rpc/mod.rs +0 -2668
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Search/Common/mod.rs +0 -21
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Search/mod.rs +0 -5993
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/SecurityCenter/mod.rs +0 -41
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Services/mod.rs +0 -587
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/SetupAndMigration/mod.rs +0 -4
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Shutdown/mod.rs +0 -111
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/StationsAndDesktops/mod.rs +0 -99
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/SubsystemForLinux/mod.rs +0 -12
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/SystemInformation/mod.rs +0 -751
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/SystemServices/mod.rs +0 -4541
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Threading/mod.rs +0 -1148
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Time/mod.rs +0 -50
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/TpmBaseServices/mod.rs +0 -89
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/UserAccessLogging/mod.rs +0 -17
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Variant/mod.rs +0 -321
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/VirtualDosMachines/mod.rs +0 -297
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/WindowsProgramming/mod.rs +0 -1633
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/Wmi/mod.rs +0 -2435
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/System/mod.rs +0 -132
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Accessibility/mod.rs +0 -1788
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/ColorSystem/mod.rs +0 -702
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Controls/Dialogs/mod.rs +0 -1128
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Controls/mod.rs +0 -7276
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/HiDpi/mod.rs +0 -66
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Input/Ime/mod.rs +0 -1394
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs +0 -765
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Input/Pointer/mod.rs +0 -168
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Input/Touch/mod.rs +0 -89
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Input/XboxController/mod.rs +0 -151
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Input/mod.rs +0 -182
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/InteractionContext/mod.rs +0 -230
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Magnification/mod.rs +0 -52
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Shell/Common/mod.rs +0 -104
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs +0 -322
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/Shell/mod.rs +0 -6704
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/TabletPC/mod.rs +0 -1537
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/TextServices/mod.rs +0 -794
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs +0 -3760
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/UI/mod.rs +0 -22
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Web/InternetExplorer/mod.rs +0 -628
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/Web/mod.rs +0 -2
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/Win32/mod.rs +0 -30
- data/ext/cargo-vendor/windows-sys-0.59.0/src/Windows/mod.rs +0 -4
- data/ext/cargo-vendor/windows-sys-0.59.0/src/core/literals.rs +0 -114
- data/ext/cargo-vendor/windows-sys-0.59.0/src/core/mod.rs +0 -33
- data/ext/cargo-vendor/windows-sys-0.59.0/src/includes/Win32/UI/WindowsAndMessaging/WindowLong.rs +0 -8
- data/ext/cargo-vendor/windows-sys-0.59.0/src/lib.rs +0 -17
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/.github/workflows/audit.yml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/.github/workflows/ci.yml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/.github/workflows/dotslash-config.json +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/.rustfmt.toml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/.rusty-hook.toml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/dev/run_benchmarks_for_file.sh +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/src/cache/mod.rs +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/src/cache/noop.rs +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/src/ownership/file_owner_finder.rs +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/src/ownership/mapper/directory_mapper.rs +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/src/ownership/mapper/escaper.rs +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/src/ownership/mapper/team_gem_mapper.rs +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/src/ownership/mapper/team_glob_mapper.rs +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/src/ownership/mapper/team_yml_mapper.rs +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/cache_test.rs +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/.github/CODEOWNERS +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/config/code_ownership.yml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/config/teams/payments.yml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/config/teams/payroll.yml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/gems/payroll_calculator/calculator.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/ruby/app/models/bank_account.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/ruby/app/models/blockchain.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/ruby/app/models/payroll.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/ruby/app/payments/nacha.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/ruby/app/services/.codeowner +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/ruby/app/services/multi_owned.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/ruby/app/unowned.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/invalid_project/ruby/packages/payroll_flow/package.yml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/multiple-directory-owners/.github/CODEOWNERS +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/multiple-directory-owners/app/consumers/.codeowner +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/multiple-directory-owners/app/consumers/deep/nesting/nestdir/deep_file.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/multiple-directory-owners/app/consumers/one_owner.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/multiple-directory-owners/app/services/.codeowner +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/multiple-directory-owners/app/services/exciting/.codeowner +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/multiple-directory-owners/app/services/exciting/some_other_file.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/multiple-directory-owners/config/teams/bar.yml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/multiple-directory-owners/config/teams/foo.yml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/.ignore +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/config/teams/payments.yml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/config/teams/payroll.yml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/config/teams/ux.yml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/gems/payroll_calculator/calculator.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/gems/pets/dog.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/javascript/packages/PayrollFlow/index.tsx +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/javascript/packages/PayrollFlow/package.json +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/javascript/packages/items/(special)/.codeowner +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/javascript/packages/items/(special)/pay.ts +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/javascript/packages/items/.codeowner +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/javascript/packages/items/item.ts +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/ruby/app/models/bank_account.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/ruby/app/payments/foo/.codeowner +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/ruby/app/payments/foo/ownedby_payroll.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/ruby/app/payments/nacha.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/ruby/app/payroll/.codeowner +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/ruby/app/payroll/payroll.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/ruby/ignored_files/git_ignored.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/ruby/packages/payroll_flow/package.yml +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/fixtures/valid_project/should_be_ignored/an_ignored_file.rb +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7/tmp/.gitkeep → codeowners-0.2.17/tests/fixtures/valid_project_with_overrides/packs/games/app/services/stats.rb} +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/git_stage_test.rs +0 -0
- /data/ext/cargo-vendor/{codeowners-0.2.7 → codeowners-0.2.17}/tests/invalid_project_structure_test.rs +0 -0
- /data/ext/cargo-vendor/{glob-0.3.2 → glob-0.3.3}/.github/dependabot.yml +0 -0
- /data/ext/cargo-vendor/{glob-0.3.2 → glob-0.3.3}/.github/workflows/publish.yml +0 -0
- /data/ext/cargo-vendor/{glob-0.3.2 → glob-0.3.3}/LICENSE-APACHE +0 -0
- /data/ext/cargo-vendor/{glob-0.3.2 → glob-0.3.3}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{glob-0.3.2 → glob-0.3.3}/triagebot.toml +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/.rustfmt.toml +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/LICENSE-APACHE +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/README.md +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/benches/bench.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/benches/faststring.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/src/arbitrary.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/src/borsh.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/src/macros.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/src/map/core/extract.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/src/map/core/raw_entry_v1.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/src/map/iter.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/src/map/serde_seq.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/src/rayon/mod.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/src/serde.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/src/set/iter.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/src/util.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/tests/equivalent_trait.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/tests/macros_full_path.rs +0 -0
- /data/ext/cargo-vendor/{indexmap-2.10.0 → indexmap-2.11.0}/tests/tests.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/LICENSE-APACHE +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/compile_fail/cannot_collect_filtermap_data.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/compile_fail/cannot_zip_filtered_data.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/compile_fail/cell_par_iter.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/compile_fail/mod.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/compile_fail/must_use.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/compile_fail/no_send_par_iter.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/compile_fail/rc_par_iter.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/delegate.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/iter/collect/consumer.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/iter/extend.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/iter/find.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/iter/for_each.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/iter/noop.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/iter/plumbing/README.md +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/iter/product.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/iter/reduce.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/iter/sum.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/iter/try_reduce.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/iter/try_reduce_with.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/par_either.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/prelude.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/private.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/split_producer.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/src/string.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/tests/chars.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/tests/cross-pool.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/tests/drain_vec.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/tests/intersperse.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/tests/issue671-unzip.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/tests/issue671.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/tests/iter_panic.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/tests/octillion.rs +0 -0
- /data/ext/cargo-vendor/{rayon-1.10.0 → rayon-1.11.0}/tests/par_bridge_recursion.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/LICENSE-APACHE +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/build.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/src/broadcast/test.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/src/compile_fail/mod.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/src/compile_fail/quicksort_race1.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/src/compile_fail/quicksort_race2.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/src/compile_fail/quicksort_race3.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/src/compile_fail/rc_return.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/src/compile_fail/rc_upvar.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/src/compile_fail/scope_join_bad.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/src/job.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/src/private.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/src/unwind.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/tests/double_init_fail.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/tests/init_zero_threads.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/tests/scope_join.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/tests/scoped_threadpool.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/tests/simple_panic.rs +0 -0
- /data/ext/cargo-vendor/{rayon-core-1.12.1 → rayon-core-1.13.0}/tests/stack_overflow_crash.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/CONTRIBUTING.md +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/LICENSE-APACHE +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/README.md +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/build.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/de.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/error.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/io/core.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/io/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/iter.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/algorithm.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/bhcomp.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/bignum.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/cached.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/cached_float80.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/digit.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/errors.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/exponent.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/float.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/large_powers.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/large_powers32.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/large_powers64.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/math.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/num.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/parse.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/rounding.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/shift.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/lexical/small_powers.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/macros.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/number.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/raw.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/read.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/value/from.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/value/index.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/value/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/value/partial_eq.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/src/value/ser.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/compiletest.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/debug.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/lexical/algorithm.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/lexical/exponent.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/lexical/float.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/lexical/math.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/lexical/num.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/lexical/parse.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/lexical/rounding.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/lexical.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/macros/mod.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/map.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/regression/issue1004.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/regression/issue520.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/regression/issue795.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/regression/issue845.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/regression/issue953.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/regression.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/stream.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/test.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/missing_colon.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/missing_colon.stderr +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/missing_comma.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/missing_comma.stderr +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/missing_value.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/missing_value.stderr +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/not_found.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/not_found.stderr +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/parse_expr.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/parse_expr.stderr +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/parse_key.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/parse_key.stderr +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/unexpected_after_array_element.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/unexpected_after_array_element.stderr +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/unexpected_after_map_entry.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/unexpected_after_map_entry.stderr +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/unexpected_colon.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/unexpected_colon.stderr +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/unexpected_comma.rs +0 -0
- /data/ext/cargo-vendor/{serde_json-1.0.142 → serde_json-1.0.143}/tests/ui/unexpected_comma.stderr +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/.github/dependabot.yml +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/LICENSE-APACHE +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/README.md +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/deny.toml +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/dir/imp/any.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/dir/imp/mod.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/dir/imp/unix.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/dir/mod.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/env.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/error.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/file/imp/mod.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/file/imp/other.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/file/imp/unix.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/file/imp/windows.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/file/mod.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/lib.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/spooled.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/src/util.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/tests/env.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/tests/namedtempfile.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/tests/spooled.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/tests/tempdir.rs +0 -0
- /data/ext/cargo-vendor/{tempfile-3.20.0 → tempfile-3.21.0}/tests/tempfile.rs +0 -0
- /data/ext/cargo-vendor/{winapi-util-0.1.9 → winapi-util-0.1.10}/.github/workflows/ci.yml +0 -0
- /data/ext/cargo-vendor/{winapi-util-0.1.9 → winapi-util-0.1.10}/COPYING +0 -0
- /data/ext/cargo-vendor/{winapi-util-0.1.9 → winapi-util-0.1.10}/LICENSE-MIT +0 -0
- /data/ext/cargo-vendor/{winapi-util-0.1.9 → winapi-util-0.1.10}/README.md +0 -0
- /data/ext/cargo-vendor/{winapi-util-0.1.9 → winapi-util-0.1.10}/UNLICENSE +0 -0
- /data/ext/cargo-vendor/{winapi-util-0.1.9 → winapi-util-0.1.10}/rustfmt.toml +0 -0
- /data/ext/cargo-vendor/{winapi-util-0.1.9 → winapi-util-0.1.10}/src/console.rs +0 -0
- /data/ext/cargo-vendor/{winapi-util-0.1.9 → winapi-util-0.1.10}/src/file.rs +0 -0
- /data/ext/cargo-vendor/{winapi-util-0.1.9 → winapi-util-0.1.10}/src/lib.rs +0 -0
- /data/ext/cargo-vendor/{winapi-util-0.1.9 → winapi-util-0.1.10}/src/sysinfo.rs +0 -0
- /data/ext/cargo-vendor/{winapi-util-0.1.9 → winapi-util-0.1.10}/src/win.rs +0 -0
@@ -1,1697 +0,0 @@
|
|
1
|
-
//! [`IndexMap`] is a hash table where the iteration order of the key-value
|
2
|
-
//! pairs is independent of the hash values of the keys.
|
3
|
-
|
4
|
-
mod core;
|
5
|
-
mod iter;
|
6
|
-
mod mutable;
|
7
|
-
mod slice;
|
8
|
-
|
9
|
-
#[cfg(feature = "serde")]
|
10
|
-
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
|
11
|
-
pub mod serde_seq;
|
12
|
-
|
13
|
-
#[cfg(test)]
|
14
|
-
mod tests;
|
15
|
-
|
16
|
-
pub use self::core::raw_entry_v1::{self, RawEntryApiV1};
|
17
|
-
pub use self::core::{Entry, IndexedEntry, OccupiedEntry, VacantEntry};
|
18
|
-
pub use self::iter::{
|
19
|
-
Drain, ExtractIf, IntoIter, IntoKeys, IntoValues, Iter, IterMut, IterMut2, Keys, Splice,
|
20
|
-
Values, ValuesMut,
|
21
|
-
};
|
22
|
-
pub use self::mutable::MutableEntryKey;
|
23
|
-
pub use self::mutable::MutableKeys;
|
24
|
-
pub use self::slice::Slice;
|
25
|
-
|
26
|
-
#[cfg(feature = "rayon")]
|
27
|
-
pub use crate::rayon::map as rayon;
|
28
|
-
|
29
|
-
use ::core::cmp::Ordering;
|
30
|
-
use ::core::fmt;
|
31
|
-
use ::core::hash::{BuildHasher, Hash, Hasher};
|
32
|
-
use ::core::mem;
|
33
|
-
use ::core::ops::{Index, IndexMut, RangeBounds};
|
34
|
-
use alloc::boxed::Box;
|
35
|
-
use alloc::vec::Vec;
|
36
|
-
|
37
|
-
#[cfg(feature = "std")]
|
38
|
-
use std::collections::hash_map::RandomState;
|
39
|
-
|
40
|
-
pub(crate) use self::core::{ExtractCore, IndexMapCore};
|
41
|
-
use crate::util::{third, try_simplify_range};
|
42
|
-
use crate::{Bucket, Equivalent, GetDisjointMutError, HashValue, TryReserveError};
|
43
|
-
|
44
|
-
/// A hash table where the iteration order of the key-value pairs is independent
|
45
|
-
/// of the hash values of the keys.
|
46
|
-
///
|
47
|
-
/// The interface is closely compatible with the standard
|
48
|
-
/// [`HashMap`][std::collections::HashMap],
|
49
|
-
/// but also has additional features.
|
50
|
-
///
|
51
|
-
/// # Order
|
52
|
-
///
|
53
|
-
/// The key-value pairs have a consistent order that is determined by
|
54
|
-
/// the sequence of insertion and removal calls on the map. The order does
|
55
|
-
/// not depend on the keys or the hash function at all.
|
56
|
-
///
|
57
|
-
/// All iterators traverse the map in *the order*.
|
58
|
-
///
|
59
|
-
/// The insertion order is preserved, with **notable exceptions** like the
|
60
|
-
/// [`.remove()`][Self::remove] or [`.swap_remove()`][Self::swap_remove] methods.
|
61
|
-
/// Methods such as [`.sort_by()`][Self::sort_by] of
|
62
|
-
/// course result in a new order, depending on the sorting order.
|
63
|
-
///
|
64
|
-
/// # Indices
|
65
|
-
///
|
66
|
-
/// The key-value pairs are indexed in a compact range without holes in the
|
67
|
-
/// range `0..self.len()`. For example, the method `.get_full` looks up the
|
68
|
-
/// index for a key, and the method `.get_index` looks up the key-value pair by
|
69
|
-
/// index.
|
70
|
-
///
|
71
|
-
/// # Examples
|
72
|
-
///
|
73
|
-
/// ```
|
74
|
-
/// use indexmap::IndexMap;
|
75
|
-
///
|
76
|
-
/// // count the frequency of each letter in a sentence.
|
77
|
-
/// let mut letters = IndexMap::new();
|
78
|
-
/// for ch in "a short treatise on fungi".chars() {
|
79
|
-
/// *letters.entry(ch).or_insert(0) += 1;
|
80
|
-
/// }
|
81
|
-
///
|
82
|
-
/// assert_eq!(letters[&'s'], 2);
|
83
|
-
/// assert_eq!(letters[&'t'], 3);
|
84
|
-
/// assert_eq!(letters[&'u'], 1);
|
85
|
-
/// assert_eq!(letters.get(&'y'), None);
|
86
|
-
/// ```
|
87
|
-
#[cfg(feature = "std")]
|
88
|
-
pub struct IndexMap<K, V, S = RandomState> {
|
89
|
-
pub(crate) core: IndexMapCore<K, V>,
|
90
|
-
hash_builder: S,
|
91
|
-
}
|
92
|
-
#[cfg(not(feature = "std"))]
|
93
|
-
pub struct IndexMap<K, V, S> {
|
94
|
-
pub(crate) core: IndexMapCore<K, V>,
|
95
|
-
hash_builder: S,
|
96
|
-
}
|
97
|
-
|
98
|
-
impl<K, V, S> Clone for IndexMap<K, V, S>
|
99
|
-
where
|
100
|
-
K: Clone,
|
101
|
-
V: Clone,
|
102
|
-
S: Clone,
|
103
|
-
{
|
104
|
-
fn clone(&self) -> Self {
|
105
|
-
IndexMap {
|
106
|
-
core: self.core.clone(),
|
107
|
-
hash_builder: self.hash_builder.clone(),
|
108
|
-
}
|
109
|
-
}
|
110
|
-
|
111
|
-
fn clone_from(&mut self, other: &Self) {
|
112
|
-
self.core.clone_from(&other.core);
|
113
|
-
self.hash_builder.clone_from(&other.hash_builder);
|
114
|
-
}
|
115
|
-
}
|
116
|
-
|
117
|
-
impl<K, V, S> fmt::Debug for IndexMap<K, V, S>
|
118
|
-
where
|
119
|
-
K: fmt::Debug,
|
120
|
-
V: fmt::Debug,
|
121
|
-
{
|
122
|
-
#[cfg(not(feature = "test_debug"))]
|
123
|
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
124
|
-
f.debug_map().entries(self.iter()).finish()
|
125
|
-
}
|
126
|
-
|
127
|
-
#[cfg(feature = "test_debug")]
|
128
|
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
129
|
-
// Let the inner `IndexMapCore` print all of its details
|
130
|
-
f.debug_struct("IndexMap")
|
131
|
-
.field("core", &self.core)
|
132
|
-
.finish()
|
133
|
-
}
|
134
|
-
}
|
135
|
-
|
136
|
-
#[cfg(feature = "std")]
|
137
|
-
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
|
138
|
-
impl<K, V> IndexMap<K, V> {
|
139
|
-
/// Create a new map. (Does not allocate.)
|
140
|
-
#[inline]
|
141
|
-
pub fn new() -> Self {
|
142
|
-
Self::with_capacity(0)
|
143
|
-
}
|
144
|
-
|
145
|
-
/// Create a new map with capacity for `n` key-value pairs. (Does not
|
146
|
-
/// allocate if `n` is zero.)
|
147
|
-
///
|
148
|
-
/// Computes in **O(n)** time.
|
149
|
-
#[inline]
|
150
|
-
pub fn with_capacity(n: usize) -> Self {
|
151
|
-
Self::with_capacity_and_hasher(n, <_>::default())
|
152
|
-
}
|
153
|
-
}
|
154
|
-
|
155
|
-
impl<K, V, S> IndexMap<K, V, S> {
|
156
|
-
/// Create a new map with capacity for `n` key-value pairs. (Does not
|
157
|
-
/// allocate if `n` is zero.)
|
158
|
-
///
|
159
|
-
/// Computes in **O(n)** time.
|
160
|
-
#[inline]
|
161
|
-
pub fn with_capacity_and_hasher(n: usize, hash_builder: S) -> Self {
|
162
|
-
if n == 0 {
|
163
|
-
Self::with_hasher(hash_builder)
|
164
|
-
} else {
|
165
|
-
IndexMap {
|
166
|
-
core: IndexMapCore::with_capacity(n),
|
167
|
-
hash_builder,
|
168
|
-
}
|
169
|
-
}
|
170
|
-
}
|
171
|
-
|
172
|
-
/// Create a new map with `hash_builder`.
|
173
|
-
///
|
174
|
-
/// This function is `const`, so it
|
175
|
-
/// can be called in `static` contexts.
|
176
|
-
pub const fn with_hasher(hash_builder: S) -> Self {
|
177
|
-
IndexMap {
|
178
|
-
core: IndexMapCore::new(),
|
179
|
-
hash_builder,
|
180
|
-
}
|
181
|
-
}
|
182
|
-
|
183
|
-
#[inline]
|
184
|
-
pub(crate) fn into_entries(self) -> Vec<Bucket<K, V>> {
|
185
|
-
self.core.into_entries()
|
186
|
-
}
|
187
|
-
|
188
|
-
#[inline]
|
189
|
-
pub(crate) fn as_entries(&self) -> &[Bucket<K, V>] {
|
190
|
-
self.core.as_entries()
|
191
|
-
}
|
192
|
-
|
193
|
-
#[inline]
|
194
|
-
pub(crate) fn as_entries_mut(&mut self) -> &mut [Bucket<K, V>] {
|
195
|
-
self.core.as_entries_mut()
|
196
|
-
}
|
197
|
-
|
198
|
-
pub(crate) fn with_entries<F>(&mut self, f: F)
|
199
|
-
where
|
200
|
-
F: FnOnce(&mut [Bucket<K, V>]),
|
201
|
-
{
|
202
|
-
self.core.with_entries(f);
|
203
|
-
}
|
204
|
-
|
205
|
-
/// Return the number of elements the map can hold without reallocating.
|
206
|
-
///
|
207
|
-
/// This number is a lower bound; the map might be able to hold more,
|
208
|
-
/// but is guaranteed to be able to hold at least this many.
|
209
|
-
///
|
210
|
-
/// Computes in **O(1)** time.
|
211
|
-
pub fn capacity(&self) -> usize {
|
212
|
-
self.core.capacity()
|
213
|
-
}
|
214
|
-
|
215
|
-
/// Return a reference to the map's `BuildHasher`.
|
216
|
-
pub fn hasher(&self) -> &S {
|
217
|
-
&self.hash_builder
|
218
|
-
}
|
219
|
-
|
220
|
-
/// Return the number of key-value pairs in the map.
|
221
|
-
///
|
222
|
-
/// Computes in **O(1)** time.
|
223
|
-
#[inline]
|
224
|
-
pub fn len(&self) -> usize {
|
225
|
-
self.core.len()
|
226
|
-
}
|
227
|
-
|
228
|
-
/// Returns true if the map contains no elements.
|
229
|
-
///
|
230
|
-
/// Computes in **O(1)** time.
|
231
|
-
#[inline]
|
232
|
-
pub fn is_empty(&self) -> bool {
|
233
|
-
self.len() == 0
|
234
|
-
}
|
235
|
-
|
236
|
-
/// Return an iterator over the key-value pairs of the map, in their order
|
237
|
-
pub fn iter(&self) -> Iter<'_, K, V> {
|
238
|
-
Iter::new(self.as_entries())
|
239
|
-
}
|
240
|
-
|
241
|
-
/// Return an iterator over the key-value pairs of the map, in their order
|
242
|
-
pub fn iter_mut(&mut self) -> IterMut<'_, K, V> {
|
243
|
-
IterMut::new(self.as_entries_mut())
|
244
|
-
}
|
245
|
-
|
246
|
-
/// Return an iterator over the keys of the map, in their order
|
247
|
-
pub fn keys(&self) -> Keys<'_, K, V> {
|
248
|
-
Keys::new(self.as_entries())
|
249
|
-
}
|
250
|
-
|
251
|
-
/// Return an owning iterator over the keys of the map, in their order
|
252
|
-
pub fn into_keys(self) -> IntoKeys<K, V> {
|
253
|
-
IntoKeys::new(self.into_entries())
|
254
|
-
}
|
255
|
-
|
256
|
-
/// Return an iterator over the values of the map, in their order
|
257
|
-
pub fn values(&self) -> Values<'_, K, V> {
|
258
|
-
Values::new(self.as_entries())
|
259
|
-
}
|
260
|
-
|
261
|
-
/// Return an iterator over mutable references to the values of the map,
|
262
|
-
/// in their order
|
263
|
-
pub fn values_mut(&mut self) -> ValuesMut<'_, K, V> {
|
264
|
-
ValuesMut::new(self.as_entries_mut())
|
265
|
-
}
|
266
|
-
|
267
|
-
/// Return an owning iterator over the values of the map, in their order
|
268
|
-
pub fn into_values(self) -> IntoValues<K, V> {
|
269
|
-
IntoValues::new(self.into_entries())
|
270
|
-
}
|
271
|
-
|
272
|
-
/// Remove all key-value pairs in the map, while preserving its capacity.
|
273
|
-
///
|
274
|
-
/// Computes in **O(n)** time.
|
275
|
-
pub fn clear(&mut self) {
|
276
|
-
self.core.clear();
|
277
|
-
}
|
278
|
-
|
279
|
-
/// Shortens the map, keeping the first `len` elements and dropping the rest.
|
280
|
-
///
|
281
|
-
/// If `len` is greater than the map's current length, this has no effect.
|
282
|
-
pub fn truncate(&mut self, len: usize) {
|
283
|
-
self.core.truncate(len);
|
284
|
-
}
|
285
|
-
|
286
|
-
/// Clears the `IndexMap` in the given index range, returning those
|
287
|
-
/// key-value pairs as a drain iterator.
|
288
|
-
///
|
289
|
-
/// The range may be any type that implements [`RangeBounds<usize>`],
|
290
|
-
/// including all of the `std::ops::Range*` types, or even a tuple pair of
|
291
|
-
/// `Bound` start and end values. To drain the map entirely, use `RangeFull`
|
292
|
-
/// like `map.drain(..)`.
|
293
|
-
///
|
294
|
-
/// This shifts down all entries following the drained range to fill the
|
295
|
-
/// gap, and keeps the allocated memory for reuse.
|
296
|
-
///
|
297
|
-
/// ***Panics*** if the starting point is greater than the end point or if
|
298
|
-
/// the end point is greater than the length of the map.
|
299
|
-
#[track_caller]
|
300
|
-
pub fn drain<R>(&mut self, range: R) -> Drain<'_, K, V>
|
301
|
-
where
|
302
|
-
R: RangeBounds<usize>,
|
303
|
-
{
|
304
|
-
Drain::new(self.core.drain(range))
|
305
|
-
}
|
306
|
-
|
307
|
-
/// Creates an iterator which uses a closure to determine if an element should be removed,
|
308
|
-
/// for all elements in the given range.
|
309
|
-
///
|
310
|
-
/// If the closure returns true, the element is removed from the map and yielded.
|
311
|
-
/// If the closure returns false, or panics, the element remains in the map and will not be
|
312
|
-
/// yielded.
|
313
|
-
///
|
314
|
-
/// Note that `extract_if` lets you mutate every value in the filter closure, regardless of
|
315
|
-
/// whether you choose to keep or remove it.
|
316
|
-
///
|
317
|
-
/// The range may be any type that implements [`RangeBounds<usize>`],
|
318
|
-
/// including all of the `std::ops::Range*` types, or even a tuple pair of
|
319
|
-
/// `Bound` start and end values. To check the entire map, use `RangeFull`
|
320
|
-
/// like `map.extract_if(.., predicate)`.
|
321
|
-
///
|
322
|
-
/// If the returned `ExtractIf` is not exhausted, e.g. because it is dropped without iterating
|
323
|
-
/// or the iteration short-circuits, then the remaining elements will be retained.
|
324
|
-
/// Use [`retain`] with a negated predicate if you do not need the returned iterator.
|
325
|
-
///
|
326
|
-
/// [`retain`]: IndexMap::retain
|
327
|
-
///
|
328
|
-
/// ***Panics*** if the starting point is greater than the end point or if
|
329
|
-
/// the end point is greater than the length of the map.
|
330
|
-
///
|
331
|
-
/// # Examples
|
332
|
-
///
|
333
|
-
/// Splitting a map into even and odd keys, reusing the original map:
|
334
|
-
///
|
335
|
-
/// ```
|
336
|
-
/// use indexmap::IndexMap;
|
337
|
-
///
|
338
|
-
/// let mut map: IndexMap<i32, i32> = (0..8).map(|x| (x, x)).collect();
|
339
|
-
/// let extracted: IndexMap<i32, i32> = map.extract_if(.., |k, _v| k % 2 == 0).collect();
|
340
|
-
///
|
341
|
-
/// let evens = extracted.keys().copied().collect::<Vec<_>>();
|
342
|
-
/// let odds = map.keys().copied().collect::<Vec<_>>();
|
343
|
-
///
|
344
|
-
/// assert_eq!(evens, vec![0, 2, 4, 6]);
|
345
|
-
/// assert_eq!(odds, vec![1, 3, 5, 7]);
|
346
|
-
/// ```
|
347
|
-
#[track_caller]
|
348
|
-
pub fn extract_if<F, R>(&mut self, range: R, pred: F) -> ExtractIf<'_, K, V, F>
|
349
|
-
where
|
350
|
-
F: FnMut(&K, &mut V) -> bool,
|
351
|
-
R: RangeBounds<usize>,
|
352
|
-
{
|
353
|
-
ExtractIf::new(&mut self.core, range, pred)
|
354
|
-
}
|
355
|
-
|
356
|
-
/// Splits the collection into two at the given index.
|
357
|
-
///
|
358
|
-
/// Returns a newly allocated map containing the elements in the range
|
359
|
-
/// `[at, len)`. After the call, the original map will be left containing
|
360
|
-
/// the elements `[0, at)` with its previous capacity unchanged.
|
361
|
-
///
|
362
|
-
/// ***Panics*** if `at > len`.
|
363
|
-
#[track_caller]
|
364
|
-
pub fn split_off(&mut self, at: usize) -> Self
|
365
|
-
where
|
366
|
-
S: Clone,
|
367
|
-
{
|
368
|
-
Self {
|
369
|
-
core: self.core.split_off(at),
|
370
|
-
hash_builder: self.hash_builder.clone(),
|
371
|
-
}
|
372
|
-
}
|
373
|
-
|
374
|
-
/// Reserve capacity for `additional` more key-value pairs.
|
375
|
-
///
|
376
|
-
/// Computes in **O(n)** time.
|
377
|
-
pub fn reserve(&mut self, additional: usize) {
|
378
|
-
self.core.reserve(additional);
|
379
|
-
}
|
380
|
-
|
381
|
-
/// Reserve capacity for `additional` more key-value pairs, without over-allocating.
|
382
|
-
///
|
383
|
-
/// Unlike `reserve`, this does not deliberately over-allocate the entry capacity to avoid
|
384
|
-
/// frequent re-allocations. However, the underlying data structures may still have internal
|
385
|
-
/// capacity requirements, and the allocator itself may give more space than requested, so this
|
386
|
-
/// cannot be relied upon to be precisely minimal.
|
387
|
-
///
|
388
|
-
/// Computes in **O(n)** time.
|
389
|
-
pub fn reserve_exact(&mut self, additional: usize) {
|
390
|
-
self.core.reserve_exact(additional);
|
391
|
-
}
|
392
|
-
|
393
|
-
/// Try to reserve capacity for `additional` more key-value pairs.
|
394
|
-
///
|
395
|
-
/// Computes in **O(n)** time.
|
396
|
-
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError> {
|
397
|
-
self.core.try_reserve(additional)
|
398
|
-
}
|
399
|
-
|
400
|
-
/// Try to reserve capacity for `additional` more key-value pairs, without over-allocating.
|
401
|
-
///
|
402
|
-
/// Unlike `try_reserve`, this does not deliberately over-allocate the entry capacity to avoid
|
403
|
-
/// frequent re-allocations. However, the underlying data structures may still have internal
|
404
|
-
/// capacity requirements, and the allocator itself may give more space than requested, so this
|
405
|
-
/// cannot be relied upon to be precisely minimal.
|
406
|
-
///
|
407
|
-
/// Computes in **O(n)** time.
|
408
|
-
pub fn try_reserve_exact(&mut self, additional: usize) -> Result<(), TryReserveError> {
|
409
|
-
self.core.try_reserve_exact(additional)
|
410
|
-
}
|
411
|
-
|
412
|
-
/// Shrink the capacity of the map as much as possible.
|
413
|
-
///
|
414
|
-
/// Computes in **O(n)** time.
|
415
|
-
pub fn shrink_to_fit(&mut self) {
|
416
|
-
self.core.shrink_to(0);
|
417
|
-
}
|
418
|
-
|
419
|
-
/// Shrink the capacity of the map with a lower limit.
|
420
|
-
///
|
421
|
-
/// Computes in **O(n)** time.
|
422
|
-
pub fn shrink_to(&mut self, min_capacity: usize) {
|
423
|
-
self.core.shrink_to(min_capacity);
|
424
|
-
}
|
425
|
-
}
|
426
|
-
|
427
|
-
impl<K, V, S> IndexMap<K, V, S>
|
428
|
-
where
|
429
|
-
K: Hash + Eq,
|
430
|
-
S: BuildHasher,
|
431
|
-
{
|
432
|
-
/// Insert a key-value pair in the map.
|
433
|
-
///
|
434
|
-
/// If an equivalent key already exists in the map: the key remains and
|
435
|
-
/// retains in its place in the order, its corresponding value is updated
|
436
|
-
/// with `value`, and the older value is returned inside `Some(_)`.
|
437
|
-
///
|
438
|
-
/// If no equivalent key existed in the map: the new key-value pair is
|
439
|
-
/// inserted, last in order, and `None` is returned.
|
440
|
-
///
|
441
|
-
/// Computes in **O(1)** time (amortized average).
|
442
|
-
///
|
443
|
-
/// See also [`entry`][Self::entry] if you want to insert *or* modify,
|
444
|
-
/// or [`insert_full`][Self::insert_full] if you need to get the index of
|
445
|
-
/// the corresponding key-value pair.
|
446
|
-
pub fn insert(&mut self, key: K, value: V) -> Option<V> {
|
447
|
-
self.insert_full(key, value).1
|
448
|
-
}
|
449
|
-
|
450
|
-
/// Insert a key-value pair in the map, and get their index.
|
451
|
-
///
|
452
|
-
/// If an equivalent key already exists in the map: the key remains and
|
453
|
-
/// retains in its place in the order, its corresponding value is updated
|
454
|
-
/// with `value`, and the older value is returned inside `(index, Some(_))`.
|
455
|
-
///
|
456
|
-
/// If no equivalent key existed in the map: the new key-value pair is
|
457
|
-
/// inserted, last in order, and `(index, None)` is returned.
|
458
|
-
///
|
459
|
-
/// Computes in **O(1)** time (amortized average).
|
460
|
-
///
|
461
|
-
/// See also [`entry`][Self::entry] if you want to insert *or* modify.
|
462
|
-
pub fn insert_full(&mut self, key: K, value: V) -> (usize, Option<V>) {
|
463
|
-
let hash = self.hash(&key);
|
464
|
-
self.core.insert_full(hash, key, value)
|
465
|
-
}
|
466
|
-
|
467
|
-
/// Insert a key-value pair in the map at its ordered position among sorted keys.
|
468
|
-
///
|
469
|
-
/// This is equivalent to finding the position with
|
470
|
-
/// [`binary_search_keys`][Self::binary_search_keys], then either updating
|
471
|
-
/// it or calling [`insert_before`][Self::insert_before] for a new key.
|
472
|
-
///
|
473
|
-
/// If the sorted key is found in the map, its corresponding value is
|
474
|
-
/// updated with `value`, and the older value is returned inside
|
475
|
-
/// `(index, Some(_))`. Otherwise, the new key-value pair is inserted at
|
476
|
-
/// the sorted position, and `(index, None)` is returned.
|
477
|
-
///
|
478
|
-
/// If the existing keys are **not** already sorted, then the insertion
|
479
|
-
/// index is unspecified (like [`slice::binary_search`]), but the key-value
|
480
|
-
/// pair is moved to or inserted at that position regardless.
|
481
|
-
///
|
482
|
-
/// Computes in **O(n)** time (average). Instead of repeating calls to
|
483
|
-
/// `insert_sorted`, it may be faster to call batched [`insert`][Self::insert]
|
484
|
-
/// or [`extend`][Self::extend] and only call [`sort_keys`][Self::sort_keys]
|
485
|
-
/// or [`sort_unstable_keys`][Self::sort_unstable_keys] once.
|
486
|
-
pub fn insert_sorted(&mut self, key: K, value: V) -> (usize, Option<V>)
|
487
|
-
where
|
488
|
-
K: Ord,
|
489
|
-
{
|
490
|
-
match self.binary_search_keys(&key) {
|
491
|
-
Ok(i) => (i, Some(mem::replace(&mut self[i], value))),
|
492
|
-
Err(i) => self.insert_before(i, key, value),
|
493
|
-
}
|
494
|
-
}
|
495
|
-
|
496
|
-
/// Insert a key-value pair in the map before the entry at the given index, or at the end.
|
497
|
-
///
|
498
|
-
/// If an equivalent key already exists in the map: the key remains and
|
499
|
-
/// is moved to the new position in the map, its corresponding value is updated
|
500
|
-
/// with `value`, and the older value is returned inside `Some(_)`. The returned index
|
501
|
-
/// will either be the given index or one less, depending on how the entry moved.
|
502
|
-
/// (See [`shift_insert`](Self::shift_insert) for different behavior here.)
|
503
|
-
///
|
504
|
-
/// If no equivalent key existed in the map: the new key-value pair is
|
505
|
-
/// inserted exactly at the given index, and `None` is returned.
|
506
|
-
///
|
507
|
-
/// ***Panics*** if `index` is out of bounds.
|
508
|
-
/// Valid indices are `0..=map.len()` (inclusive).
|
509
|
-
///
|
510
|
-
/// Computes in **O(n)** time (average).
|
511
|
-
///
|
512
|
-
/// See also [`entry`][Self::entry] if you want to insert *or* modify,
|
513
|
-
/// perhaps only using the index for new entries with [`VacantEntry::shift_insert`].
|
514
|
-
///
|
515
|
-
/// # Examples
|
516
|
-
///
|
517
|
-
/// ```
|
518
|
-
/// use indexmap::IndexMap;
|
519
|
-
/// let mut map: IndexMap<char, ()> = ('a'..='z').map(|c| (c, ())).collect();
|
520
|
-
///
|
521
|
-
/// // The new key '*' goes exactly at the given index.
|
522
|
-
/// assert_eq!(map.get_index_of(&'*'), None);
|
523
|
-
/// assert_eq!(map.insert_before(10, '*', ()), (10, None));
|
524
|
-
/// assert_eq!(map.get_index_of(&'*'), Some(10));
|
525
|
-
///
|
526
|
-
/// // Moving the key 'a' up will shift others down, so this moves *before* 10 to index 9.
|
527
|
-
/// assert_eq!(map.insert_before(10, 'a', ()), (9, Some(())));
|
528
|
-
/// assert_eq!(map.get_index_of(&'a'), Some(9));
|
529
|
-
/// assert_eq!(map.get_index_of(&'*'), Some(10));
|
530
|
-
///
|
531
|
-
/// // Moving the key 'z' down will shift others up, so this moves to exactly 10.
|
532
|
-
/// assert_eq!(map.insert_before(10, 'z', ()), (10, Some(())));
|
533
|
-
/// assert_eq!(map.get_index_of(&'z'), Some(10));
|
534
|
-
/// assert_eq!(map.get_index_of(&'*'), Some(11));
|
535
|
-
///
|
536
|
-
/// // Moving or inserting before the endpoint is also valid.
|
537
|
-
/// assert_eq!(map.len(), 27);
|
538
|
-
/// assert_eq!(map.insert_before(map.len(), '*', ()), (26, Some(())));
|
539
|
-
/// assert_eq!(map.get_index_of(&'*'), Some(26));
|
540
|
-
/// assert_eq!(map.insert_before(map.len(), '+', ()), (27, None));
|
541
|
-
/// assert_eq!(map.get_index_of(&'+'), Some(27));
|
542
|
-
/// assert_eq!(map.len(), 28);
|
543
|
-
/// ```
|
544
|
-
#[track_caller]
|
545
|
-
pub fn insert_before(&mut self, mut index: usize, key: K, value: V) -> (usize, Option<V>) {
|
546
|
-
let len = self.len();
|
547
|
-
|
548
|
-
assert!(
|
549
|
-
index <= len,
|
550
|
-
"index out of bounds: the len is {len} but the index is {index}. Expected index <= len"
|
551
|
-
);
|
552
|
-
|
553
|
-
match self.entry(key) {
|
554
|
-
Entry::Occupied(mut entry) => {
|
555
|
-
if index > entry.index() {
|
556
|
-
// Some entries will shift down when this one moves up,
|
557
|
-
// so "insert before index" becomes "move to index - 1",
|
558
|
-
// keeping the entry at the original index unmoved.
|
559
|
-
index -= 1;
|
560
|
-
}
|
561
|
-
let old = mem::replace(entry.get_mut(), value);
|
562
|
-
entry.move_index(index);
|
563
|
-
(index, Some(old))
|
564
|
-
}
|
565
|
-
Entry::Vacant(entry) => {
|
566
|
-
entry.shift_insert(index, value);
|
567
|
-
(index, None)
|
568
|
-
}
|
569
|
-
}
|
570
|
-
}
|
571
|
-
|
572
|
-
/// Insert a key-value pair in the map at the given index.
|
573
|
-
///
|
574
|
-
/// If an equivalent key already exists in the map: the key remains and
|
575
|
-
/// is moved to the given index in the map, its corresponding value is updated
|
576
|
-
/// with `value`, and the older value is returned inside `Some(_)`.
|
577
|
-
/// Note that existing entries **cannot** be moved to `index == map.len()`!
|
578
|
-
/// (See [`insert_before`](Self::insert_before) for different behavior here.)
|
579
|
-
///
|
580
|
-
/// If no equivalent key existed in the map: the new key-value pair is
|
581
|
-
/// inserted at the given index, and `None` is returned.
|
582
|
-
///
|
583
|
-
/// ***Panics*** if `index` is out of bounds.
|
584
|
-
/// Valid indices are `0..map.len()` (exclusive) when moving an existing entry, or
|
585
|
-
/// `0..=map.len()` (inclusive) when inserting a new key.
|
586
|
-
///
|
587
|
-
/// Computes in **O(n)** time (average).
|
588
|
-
///
|
589
|
-
/// See also [`entry`][Self::entry] if you want to insert *or* modify,
|
590
|
-
/// perhaps only using the index for new entries with [`VacantEntry::shift_insert`].
|
591
|
-
///
|
592
|
-
/// # Examples
|
593
|
-
///
|
594
|
-
/// ```
|
595
|
-
/// use indexmap::IndexMap;
|
596
|
-
/// let mut map: IndexMap<char, ()> = ('a'..='z').map(|c| (c, ())).collect();
|
597
|
-
///
|
598
|
-
/// // The new key '*' goes exactly at the given index.
|
599
|
-
/// assert_eq!(map.get_index_of(&'*'), None);
|
600
|
-
/// assert_eq!(map.shift_insert(10, '*', ()), None);
|
601
|
-
/// assert_eq!(map.get_index_of(&'*'), Some(10));
|
602
|
-
///
|
603
|
-
/// // Moving the key 'a' up to 10 will shift others down, including the '*' that was at 10.
|
604
|
-
/// assert_eq!(map.shift_insert(10, 'a', ()), Some(()));
|
605
|
-
/// assert_eq!(map.get_index_of(&'a'), Some(10));
|
606
|
-
/// assert_eq!(map.get_index_of(&'*'), Some(9));
|
607
|
-
///
|
608
|
-
/// // Moving the key 'z' down to 9 will shift others up, including the '*' that was at 9.
|
609
|
-
/// assert_eq!(map.shift_insert(9, 'z', ()), Some(()));
|
610
|
-
/// assert_eq!(map.get_index_of(&'z'), Some(9));
|
611
|
-
/// assert_eq!(map.get_index_of(&'*'), Some(10));
|
612
|
-
///
|
613
|
-
/// // Existing keys can move to len-1 at most, but new keys can insert at the endpoint.
|
614
|
-
/// assert_eq!(map.len(), 27);
|
615
|
-
/// assert_eq!(map.shift_insert(map.len() - 1, '*', ()), Some(()));
|
616
|
-
/// assert_eq!(map.get_index_of(&'*'), Some(26));
|
617
|
-
/// assert_eq!(map.shift_insert(map.len(), '+', ()), None);
|
618
|
-
/// assert_eq!(map.get_index_of(&'+'), Some(27));
|
619
|
-
/// assert_eq!(map.len(), 28);
|
620
|
-
/// ```
|
621
|
-
///
|
622
|
-
/// ```should_panic
|
623
|
-
/// use indexmap::IndexMap;
|
624
|
-
/// let mut map: IndexMap<char, ()> = ('a'..='z').map(|c| (c, ())).collect();
|
625
|
-
///
|
626
|
-
/// // This is an invalid index for moving an existing key!
|
627
|
-
/// map.shift_insert(map.len(), 'a', ());
|
628
|
-
/// ```
|
629
|
-
#[track_caller]
|
630
|
-
pub fn shift_insert(&mut self, index: usize, key: K, value: V) -> Option<V> {
|
631
|
-
let len = self.len();
|
632
|
-
match self.entry(key) {
|
633
|
-
Entry::Occupied(mut entry) => {
|
634
|
-
assert!(
|
635
|
-
index < len,
|
636
|
-
"index out of bounds: the len is {len} but the index is {index}"
|
637
|
-
);
|
638
|
-
|
639
|
-
let old = mem::replace(entry.get_mut(), value);
|
640
|
-
entry.move_index(index);
|
641
|
-
Some(old)
|
642
|
-
}
|
643
|
-
Entry::Vacant(entry) => {
|
644
|
-
assert!(
|
645
|
-
index <= len,
|
646
|
-
"index out of bounds: the len is {len} but the index is {index}. Expected index <= len"
|
647
|
-
);
|
648
|
-
|
649
|
-
entry.shift_insert(index, value);
|
650
|
-
None
|
651
|
-
}
|
652
|
-
}
|
653
|
-
}
|
654
|
-
|
655
|
-
/// Get the given key’s corresponding entry in the map for insertion and/or
|
656
|
-
/// in-place manipulation.
|
657
|
-
///
|
658
|
-
/// Computes in **O(1)** time (amortized average).
|
659
|
-
pub fn entry(&mut self, key: K) -> Entry<'_, K, V> {
|
660
|
-
let hash = self.hash(&key);
|
661
|
-
self.core.entry(hash, key)
|
662
|
-
}
|
663
|
-
|
664
|
-
/// Creates a splicing iterator that replaces the specified range in the map
|
665
|
-
/// with the given `replace_with` key-value iterator and yields the removed
|
666
|
-
/// items. `replace_with` does not need to be the same length as `range`.
|
667
|
-
///
|
668
|
-
/// The `range` is removed even if the iterator is not consumed until the
|
669
|
-
/// end. It is unspecified how many elements are removed from the map if the
|
670
|
-
/// `Splice` value is leaked.
|
671
|
-
///
|
672
|
-
/// The input iterator `replace_with` is only consumed when the `Splice`
|
673
|
-
/// value is dropped. If a key from the iterator matches an existing entry
|
674
|
-
/// in the map (outside of `range`), then the value will be updated in that
|
675
|
-
/// position. Otherwise, the new key-value pair will be inserted in the
|
676
|
-
/// replaced `range`.
|
677
|
-
///
|
678
|
-
/// ***Panics*** if the starting point is greater than the end point or if
|
679
|
-
/// the end point is greater than the length of the map.
|
680
|
-
///
|
681
|
-
/// # Examples
|
682
|
-
///
|
683
|
-
/// ```
|
684
|
-
/// use indexmap::IndexMap;
|
685
|
-
///
|
686
|
-
/// let mut map = IndexMap::from([(0, '_'), (1, 'a'), (2, 'b'), (3, 'c'), (4, 'd')]);
|
687
|
-
/// let new = [(5, 'E'), (4, 'D'), (3, 'C'), (2, 'B'), (1, 'A')];
|
688
|
-
/// let removed: Vec<_> = map.splice(2..4, new).collect();
|
689
|
-
///
|
690
|
-
/// // 1 and 4 got new values, while 5, 3, and 2 were newly inserted.
|
691
|
-
/// assert!(map.into_iter().eq([(0, '_'), (1, 'A'), (5, 'E'), (3, 'C'), (2, 'B'), (4, 'D')]));
|
692
|
-
/// assert_eq!(removed, &[(2, 'b'), (3, 'c')]);
|
693
|
-
/// ```
|
694
|
-
#[track_caller]
|
695
|
-
pub fn splice<R, I>(&mut self, range: R, replace_with: I) -> Splice<'_, I::IntoIter, K, V, S>
|
696
|
-
where
|
697
|
-
R: RangeBounds<usize>,
|
698
|
-
I: IntoIterator<Item = (K, V)>,
|
699
|
-
{
|
700
|
-
Splice::new(self, range, replace_with.into_iter())
|
701
|
-
}
|
702
|
-
|
703
|
-
/// Moves all key-value pairs from `other` into `self`, leaving `other` empty.
|
704
|
-
///
|
705
|
-
/// This is equivalent to calling [`insert`][Self::insert] for each
|
706
|
-
/// key-value pair from `other` in order, which means that for keys that
|
707
|
-
/// already exist in `self`, their value is updated in the current position.
|
708
|
-
///
|
709
|
-
/// # Examples
|
710
|
-
///
|
711
|
-
/// ```
|
712
|
-
/// use indexmap::IndexMap;
|
713
|
-
///
|
714
|
-
/// // Note: Key (3) is present in both maps.
|
715
|
-
/// let mut a = IndexMap::from([(3, "c"), (2, "b"), (1, "a")]);
|
716
|
-
/// let mut b = IndexMap::from([(3, "d"), (4, "e"), (5, "f")]);
|
717
|
-
/// let old_capacity = b.capacity();
|
718
|
-
///
|
719
|
-
/// a.append(&mut b);
|
720
|
-
///
|
721
|
-
/// assert_eq!(a.len(), 5);
|
722
|
-
/// assert_eq!(b.len(), 0);
|
723
|
-
/// assert_eq!(b.capacity(), old_capacity);
|
724
|
-
///
|
725
|
-
/// assert!(a.keys().eq(&[3, 2, 1, 4, 5]));
|
726
|
-
/// assert_eq!(a[&3], "d"); // "c" was overwritten.
|
727
|
-
/// ```
|
728
|
-
pub fn append<S2>(&mut self, other: &mut IndexMap<K, V, S2>) {
|
729
|
-
self.extend(other.drain(..));
|
730
|
-
}
|
731
|
-
}
|
732
|
-
|
733
|
-
impl<K, V, S> IndexMap<K, V, S>
|
734
|
-
where
|
735
|
-
S: BuildHasher,
|
736
|
-
{
|
737
|
-
pub(crate) fn hash<Q: ?Sized + Hash>(&self, key: &Q) -> HashValue {
|
738
|
-
let mut h = self.hash_builder.build_hasher();
|
739
|
-
key.hash(&mut h);
|
740
|
-
HashValue(h.finish() as usize)
|
741
|
-
}
|
742
|
-
|
743
|
-
/// Return `true` if an equivalent to `key` exists in the map.
|
744
|
-
///
|
745
|
-
/// Computes in **O(1)** time (average).
|
746
|
-
pub fn contains_key<Q>(&self, key: &Q) -> bool
|
747
|
-
where
|
748
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
749
|
-
{
|
750
|
-
self.get_index_of(key).is_some()
|
751
|
-
}
|
752
|
-
|
753
|
-
/// Return a reference to the value stored for `key`, if it is present,
|
754
|
-
/// else `None`.
|
755
|
-
///
|
756
|
-
/// Computes in **O(1)** time (average).
|
757
|
-
pub fn get<Q>(&self, key: &Q) -> Option<&V>
|
758
|
-
where
|
759
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
760
|
-
{
|
761
|
-
if let Some(i) = self.get_index_of(key) {
|
762
|
-
let entry = &self.as_entries()[i];
|
763
|
-
Some(&entry.value)
|
764
|
-
} else {
|
765
|
-
None
|
766
|
-
}
|
767
|
-
}
|
768
|
-
|
769
|
-
/// Return references to the key-value pair stored for `key`,
|
770
|
-
/// if it is present, else `None`.
|
771
|
-
///
|
772
|
-
/// Computes in **O(1)** time (average).
|
773
|
-
pub fn get_key_value<Q>(&self, key: &Q) -> Option<(&K, &V)>
|
774
|
-
where
|
775
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
776
|
-
{
|
777
|
-
if let Some(i) = self.get_index_of(key) {
|
778
|
-
let entry = &self.as_entries()[i];
|
779
|
-
Some((&entry.key, &entry.value))
|
780
|
-
} else {
|
781
|
-
None
|
782
|
-
}
|
783
|
-
}
|
784
|
-
|
785
|
-
/// Return item index, key and value
|
786
|
-
pub fn get_full<Q>(&self, key: &Q) -> Option<(usize, &K, &V)>
|
787
|
-
where
|
788
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
789
|
-
{
|
790
|
-
if let Some(i) = self.get_index_of(key) {
|
791
|
-
let entry = &self.as_entries()[i];
|
792
|
-
Some((i, &entry.key, &entry.value))
|
793
|
-
} else {
|
794
|
-
None
|
795
|
-
}
|
796
|
-
}
|
797
|
-
|
798
|
-
/// Return item index, if it exists in the map
|
799
|
-
///
|
800
|
-
/// Computes in **O(1)** time (average).
|
801
|
-
pub fn get_index_of<Q>(&self, key: &Q) -> Option<usize>
|
802
|
-
where
|
803
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
804
|
-
{
|
805
|
-
match self.as_entries() {
|
806
|
-
[] => None,
|
807
|
-
[x] => key.equivalent(&x.key).then_some(0),
|
808
|
-
_ => {
|
809
|
-
let hash = self.hash(key);
|
810
|
-
self.core.get_index_of(hash, key)
|
811
|
-
}
|
812
|
-
}
|
813
|
-
}
|
814
|
-
|
815
|
-
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
|
816
|
-
where
|
817
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
818
|
-
{
|
819
|
-
if let Some(i) = self.get_index_of(key) {
|
820
|
-
let entry = &mut self.as_entries_mut()[i];
|
821
|
-
Some(&mut entry.value)
|
822
|
-
} else {
|
823
|
-
None
|
824
|
-
}
|
825
|
-
}
|
826
|
-
|
827
|
-
pub fn get_full_mut<Q>(&mut self, key: &Q) -> Option<(usize, &K, &mut V)>
|
828
|
-
where
|
829
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
830
|
-
{
|
831
|
-
if let Some(i) = self.get_index_of(key) {
|
832
|
-
let entry = &mut self.as_entries_mut()[i];
|
833
|
-
Some((i, &entry.key, &mut entry.value))
|
834
|
-
} else {
|
835
|
-
None
|
836
|
-
}
|
837
|
-
}
|
838
|
-
|
839
|
-
/// Return the values for `N` keys. If any key is duplicated, this function will panic.
|
840
|
-
///
|
841
|
-
/// # Examples
|
842
|
-
///
|
843
|
-
/// ```
|
844
|
-
/// let mut map = indexmap::IndexMap::from([(1, 'a'), (3, 'b'), (2, 'c')]);
|
845
|
-
/// assert_eq!(map.get_disjoint_mut([&2, &1]), [Some(&mut 'c'), Some(&mut 'a')]);
|
846
|
-
/// ```
|
847
|
-
pub fn get_disjoint_mut<Q, const N: usize>(&mut self, keys: [&Q; N]) -> [Option<&mut V>; N]
|
848
|
-
where
|
849
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
850
|
-
{
|
851
|
-
let indices = keys.map(|key| self.get_index_of(key));
|
852
|
-
match self.as_mut_slice().get_disjoint_opt_mut(indices) {
|
853
|
-
Err(GetDisjointMutError::IndexOutOfBounds) => {
|
854
|
-
unreachable!(
|
855
|
-
"Internal error: indices should never be OOB as we got them from get_index_of"
|
856
|
-
);
|
857
|
-
}
|
858
|
-
Err(GetDisjointMutError::OverlappingIndices) => {
|
859
|
-
panic!("duplicate keys found");
|
860
|
-
}
|
861
|
-
Ok(key_values) => key_values.map(|kv_opt| kv_opt.map(|kv| kv.1)),
|
862
|
-
}
|
863
|
-
}
|
864
|
-
|
865
|
-
/// Remove the key-value pair equivalent to `key` and return
|
866
|
-
/// its value.
|
867
|
-
///
|
868
|
-
/// **NOTE:** This is equivalent to [`.swap_remove(key)`][Self::swap_remove], replacing this
|
869
|
-
/// entry's position with the last element, and it is deprecated in favor of calling that
|
870
|
-
/// explicitly. If you need to preserve the relative order of the keys in the map, use
|
871
|
-
/// [`.shift_remove(key)`][Self::shift_remove] instead.
|
872
|
-
#[deprecated(note = "`remove` disrupts the map order -- \
|
873
|
-
use `swap_remove` or `shift_remove` for explicit behavior.")]
|
874
|
-
pub fn remove<Q>(&mut self, key: &Q) -> Option<V>
|
875
|
-
where
|
876
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
877
|
-
{
|
878
|
-
self.swap_remove(key)
|
879
|
-
}
|
880
|
-
|
881
|
-
/// Remove and return the key-value pair equivalent to `key`.
|
882
|
-
///
|
883
|
-
/// **NOTE:** This is equivalent to [`.swap_remove_entry(key)`][Self::swap_remove_entry],
|
884
|
-
/// replacing this entry's position with the last element, and it is deprecated in favor of
|
885
|
-
/// calling that explicitly. If you need to preserve the relative order of the keys in the map,
|
886
|
-
/// use [`.shift_remove_entry(key)`][Self::shift_remove_entry] instead.
|
887
|
-
#[deprecated(note = "`remove_entry` disrupts the map order -- \
|
888
|
-
use `swap_remove_entry` or `shift_remove_entry` for explicit behavior.")]
|
889
|
-
pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
|
890
|
-
where
|
891
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
892
|
-
{
|
893
|
-
self.swap_remove_entry(key)
|
894
|
-
}
|
895
|
-
|
896
|
-
/// Remove the key-value pair equivalent to `key` and return
|
897
|
-
/// its value.
|
898
|
-
///
|
899
|
-
/// Like [`Vec::swap_remove`], the pair is removed by swapping it with the
|
900
|
-
/// last element of the map and popping it off. **This perturbs
|
901
|
-
/// the position of what used to be the last element!**
|
902
|
-
///
|
903
|
-
/// Return `None` if `key` is not in map.
|
904
|
-
///
|
905
|
-
/// Computes in **O(1)** time (average).
|
906
|
-
pub fn swap_remove<Q>(&mut self, key: &Q) -> Option<V>
|
907
|
-
where
|
908
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
909
|
-
{
|
910
|
-
self.swap_remove_full(key).map(third)
|
911
|
-
}
|
912
|
-
|
913
|
-
/// Remove and return the key-value pair equivalent to `key`.
|
914
|
-
///
|
915
|
-
/// Like [`Vec::swap_remove`], the pair is removed by swapping it with the
|
916
|
-
/// last element of the map and popping it off. **This perturbs
|
917
|
-
/// the position of what used to be the last element!**
|
918
|
-
///
|
919
|
-
/// Return `None` if `key` is not in map.
|
920
|
-
///
|
921
|
-
/// Computes in **O(1)** time (average).
|
922
|
-
pub fn swap_remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
|
923
|
-
where
|
924
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
925
|
-
{
|
926
|
-
match self.swap_remove_full(key) {
|
927
|
-
Some((_, key, value)) => Some((key, value)),
|
928
|
-
None => None,
|
929
|
-
}
|
930
|
-
}
|
931
|
-
|
932
|
-
/// Remove the key-value pair equivalent to `key` and return it and
|
933
|
-
/// the index it had.
|
934
|
-
///
|
935
|
-
/// Like [`Vec::swap_remove`], the pair is removed by swapping it with the
|
936
|
-
/// last element of the map and popping it off. **This perturbs
|
937
|
-
/// the position of what used to be the last element!**
|
938
|
-
///
|
939
|
-
/// Return `None` if `key` is not in map.
|
940
|
-
///
|
941
|
-
/// Computes in **O(1)** time (average).
|
942
|
-
pub fn swap_remove_full<Q>(&mut self, key: &Q) -> Option<(usize, K, V)>
|
943
|
-
where
|
944
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
945
|
-
{
|
946
|
-
match self.as_entries() {
|
947
|
-
[x] if key.equivalent(&x.key) => {
|
948
|
-
let (k, v) = self.core.pop()?;
|
949
|
-
Some((0, k, v))
|
950
|
-
}
|
951
|
-
[_] | [] => None,
|
952
|
-
_ => {
|
953
|
-
let hash = self.hash(key);
|
954
|
-
self.core.swap_remove_full(hash, key)
|
955
|
-
}
|
956
|
-
}
|
957
|
-
}
|
958
|
-
|
959
|
-
/// Remove the key-value pair equivalent to `key` and return
|
960
|
-
/// its value.
|
961
|
-
///
|
962
|
-
/// Like [`Vec::remove`], the pair is removed by shifting all of the
|
963
|
-
/// elements that follow it, preserving their relative order.
|
964
|
-
/// **This perturbs the index of all of those elements!**
|
965
|
-
///
|
966
|
-
/// Return `None` if `key` is not in map.
|
967
|
-
///
|
968
|
-
/// Computes in **O(n)** time (average).
|
969
|
-
pub fn shift_remove<Q>(&mut self, key: &Q) -> Option<V>
|
970
|
-
where
|
971
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
972
|
-
{
|
973
|
-
self.shift_remove_full(key).map(third)
|
974
|
-
}
|
975
|
-
|
976
|
-
/// Remove and return the key-value pair equivalent to `key`.
|
977
|
-
///
|
978
|
-
/// Like [`Vec::remove`], the pair is removed by shifting all of the
|
979
|
-
/// elements that follow it, preserving their relative order.
|
980
|
-
/// **This perturbs the index of all of those elements!**
|
981
|
-
///
|
982
|
-
/// Return `None` if `key` is not in map.
|
983
|
-
///
|
984
|
-
/// Computes in **O(n)** time (average).
|
985
|
-
pub fn shift_remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
|
986
|
-
where
|
987
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
988
|
-
{
|
989
|
-
match self.shift_remove_full(key) {
|
990
|
-
Some((_, key, value)) => Some((key, value)),
|
991
|
-
None => None,
|
992
|
-
}
|
993
|
-
}
|
994
|
-
|
995
|
-
/// Remove the key-value pair equivalent to `key` and return it and
|
996
|
-
/// the index it had.
|
997
|
-
///
|
998
|
-
/// Like [`Vec::remove`], the pair is removed by shifting all of the
|
999
|
-
/// elements that follow it, preserving their relative order.
|
1000
|
-
/// **This perturbs the index of all of those elements!**
|
1001
|
-
///
|
1002
|
-
/// Return `None` if `key` is not in map.
|
1003
|
-
///
|
1004
|
-
/// Computes in **O(n)** time (average).
|
1005
|
-
pub fn shift_remove_full<Q>(&mut self, key: &Q) -> Option<(usize, K, V)>
|
1006
|
-
where
|
1007
|
-
Q: ?Sized + Hash + Equivalent<K>,
|
1008
|
-
{
|
1009
|
-
match self.as_entries() {
|
1010
|
-
[x] if key.equivalent(&x.key) => {
|
1011
|
-
let (k, v) = self.core.pop()?;
|
1012
|
-
Some((0, k, v))
|
1013
|
-
}
|
1014
|
-
[_] | [] => None,
|
1015
|
-
_ => {
|
1016
|
-
let hash = self.hash(key);
|
1017
|
-
self.core.shift_remove_full(hash, key)
|
1018
|
-
}
|
1019
|
-
}
|
1020
|
-
}
|
1021
|
-
}
|
1022
|
-
|
1023
|
-
impl<K, V, S> IndexMap<K, V, S> {
|
1024
|
-
/// Remove the last key-value pair
|
1025
|
-
///
|
1026
|
-
/// This preserves the order of the remaining elements.
|
1027
|
-
///
|
1028
|
-
/// Computes in **O(1)** time (average).
|
1029
|
-
#[doc(alias = "pop_last")] // like `BTreeMap`
|
1030
|
-
pub fn pop(&mut self) -> Option<(K, V)> {
|
1031
|
-
self.core.pop()
|
1032
|
-
}
|
1033
|
-
|
1034
|
-
/// Scan through each key-value pair in the map and keep those where the
|
1035
|
-
/// closure `keep` returns `true`.
|
1036
|
-
///
|
1037
|
-
/// The elements are visited in order, and remaining elements keep their
|
1038
|
-
/// order.
|
1039
|
-
///
|
1040
|
-
/// Computes in **O(n)** time (average).
|
1041
|
-
pub fn retain<F>(&mut self, mut keep: F)
|
1042
|
-
where
|
1043
|
-
F: FnMut(&K, &mut V) -> bool,
|
1044
|
-
{
|
1045
|
-
self.core.retain_in_order(move |k, v| keep(k, v));
|
1046
|
-
}
|
1047
|
-
|
1048
|
-
/// Sort the map’s key-value pairs by the default ordering of the keys.
|
1049
|
-
///
|
1050
|
-
/// This is a stable sort -- but equivalent keys should not normally coexist in
|
1051
|
-
/// a map at all, so [`sort_unstable_keys`][Self::sort_unstable_keys] is preferred
|
1052
|
-
/// because it is generally faster and doesn't allocate auxiliary memory.
|
1053
|
-
///
|
1054
|
-
/// See [`sort_by`](Self::sort_by) for details.
|
1055
|
-
pub fn sort_keys(&mut self)
|
1056
|
-
where
|
1057
|
-
K: Ord,
|
1058
|
-
{
|
1059
|
-
self.with_entries(move |entries| {
|
1060
|
-
entries.sort_by(move |a, b| K::cmp(&a.key, &b.key));
|
1061
|
-
});
|
1062
|
-
}
|
1063
|
-
|
1064
|
-
/// Sort the map’s key-value pairs in place using the comparison
|
1065
|
-
/// function `cmp`.
|
1066
|
-
///
|
1067
|
-
/// The comparison function receives two key and value pairs to compare (you
|
1068
|
-
/// can sort by keys or values or their combination as needed).
|
1069
|
-
///
|
1070
|
-
/// Computes in **O(n log n + c)** time and **O(n)** space where *n* is
|
1071
|
-
/// the length of the map and *c* the capacity. The sort is stable.
|
1072
|
-
pub fn sort_by<F>(&mut self, mut cmp: F)
|
1073
|
-
where
|
1074
|
-
F: FnMut(&K, &V, &K, &V) -> Ordering,
|
1075
|
-
{
|
1076
|
-
self.with_entries(move |entries| {
|
1077
|
-
entries.sort_by(move |a, b| cmp(&a.key, &a.value, &b.key, &b.value));
|
1078
|
-
});
|
1079
|
-
}
|
1080
|
-
|
1081
|
-
/// Sort the key-value pairs of the map and return a by-value iterator of
|
1082
|
-
/// the key-value pairs with the result.
|
1083
|
-
///
|
1084
|
-
/// The sort is stable.
|
1085
|
-
pub fn sorted_by<F>(self, mut cmp: F) -> IntoIter<K, V>
|
1086
|
-
where
|
1087
|
-
F: FnMut(&K, &V, &K, &V) -> Ordering,
|
1088
|
-
{
|
1089
|
-
let mut entries = self.into_entries();
|
1090
|
-
entries.sort_by(move |a, b| cmp(&a.key, &a.value, &b.key, &b.value));
|
1091
|
-
IntoIter::new(entries)
|
1092
|
-
}
|
1093
|
-
|
1094
|
-
/// Sort the map's key-value pairs by the default ordering of the keys, but
|
1095
|
-
/// may not preserve the order of equal elements.
|
1096
|
-
///
|
1097
|
-
/// See [`sort_unstable_by`](Self::sort_unstable_by) for details.
|
1098
|
-
pub fn sort_unstable_keys(&mut self)
|
1099
|
-
where
|
1100
|
-
K: Ord,
|
1101
|
-
{
|
1102
|
-
self.with_entries(move |entries| {
|
1103
|
-
entries.sort_unstable_by(move |a, b| K::cmp(&a.key, &b.key));
|
1104
|
-
});
|
1105
|
-
}
|
1106
|
-
|
1107
|
-
/// Sort the map's key-value pairs in place using the comparison function `cmp`, but
|
1108
|
-
/// may not preserve the order of equal elements.
|
1109
|
-
///
|
1110
|
-
/// The comparison function receives two key and value pairs to compare (you
|
1111
|
-
/// can sort by keys or values or their combination as needed).
|
1112
|
-
///
|
1113
|
-
/// Computes in **O(n log n + c)** time where *n* is
|
1114
|
-
/// the length of the map and *c* is the capacity. The sort is unstable.
|
1115
|
-
pub fn sort_unstable_by<F>(&mut self, mut cmp: F)
|
1116
|
-
where
|
1117
|
-
F: FnMut(&K, &V, &K, &V) -> Ordering,
|
1118
|
-
{
|
1119
|
-
self.with_entries(move |entries| {
|
1120
|
-
entries.sort_unstable_by(move |a, b| cmp(&a.key, &a.value, &b.key, &b.value));
|
1121
|
-
});
|
1122
|
-
}
|
1123
|
-
|
1124
|
-
/// Sort the key-value pairs of the map and return a by-value iterator of
|
1125
|
-
/// the key-value pairs with the result.
|
1126
|
-
///
|
1127
|
-
/// The sort is unstable.
|
1128
|
-
#[inline]
|
1129
|
-
pub fn sorted_unstable_by<F>(self, mut cmp: F) -> IntoIter<K, V>
|
1130
|
-
where
|
1131
|
-
F: FnMut(&K, &V, &K, &V) -> Ordering,
|
1132
|
-
{
|
1133
|
-
let mut entries = self.into_entries();
|
1134
|
-
entries.sort_unstable_by(move |a, b| cmp(&a.key, &a.value, &b.key, &b.value));
|
1135
|
-
IntoIter::new(entries)
|
1136
|
-
}
|
1137
|
-
|
1138
|
-
/// Sort the map’s key-value pairs in place using a sort-key extraction function.
|
1139
|
-
///
|
1140
|
-
/// During sorting, the function is called at most once per entry, by using temporary storage
|
1141
|
-
/// to remember the results of its evaluation. The order of calls to the function is
|
1142
|
-
/// unspecified and may change between versions of `indexmap` or the standard library.
|
1143
|
-
///
|
1144
|
-
/// Computes in **O(m n + n log n + c)** time () and **O(n)** space, where the function is
|
1145
|
-
/// **O(m)**, *n* is the length of the map, and *c* the capacity. The sort is stable.
|
1146
|
-
pub fn sort_by_cached_key<T, F>(&mut self, mut sort_key: F)
|
1147
|
-
where
|
1148
|
-
T: Ord,
|
1149
|
-
F: FnMut(&K, &V) -> T,
|
1150
|
-
{
|
1151
|
-
self.with_entries(move |entries| {
|
1152
|
-
entries.sort_by_cached_key(move |a| sort_key(&a.key, &a.value));
|
1153
|
-
});
|
1154
|
-
}
|
1155
|
-
|
1156
|
-
/// Search over a sorted map for a key.
|
1157
|
-
///
|
1158
|
-
/// Returns the position where that key is present, or the position where it can be inserted to
|
1159
|
-
/// maintain the sort. See [`slice::binary_search`] for more details.
|
1160
|
-
///
|
1161
|
-
/// Computes in **O(log(n))** time, which is notably less scalable than looking the key up
|
1162
|
-
/// using [`get_index_of`][IndexMap::get_index_of], but this can also position missing keys.
|
1163
|
-
pub fn binary_search_keys(&self, x: &K) -> Result<usize, usize>
|
1164
|
-
where
|
1165
|
-
K: Ord,
|
1166
|
-
{
|
1167
|
-
self.as_slice().binary_search_keys(x)
|
1168
|
-
}
|
1169
|
-
|
1170
|
-
/// Search over a sorted map with a comparator function.
|
1171
|
-
///
|
1172
|
-
/// Returns the position where that value is present, or the position where it can be inserted
|
1173
|
-
/// to maintain the sort. See [`slice::binary_search_by`] for more details.
|
1174
|
-
///
|
1175
|
-
/// Computes in **O(log(n))** time.
|
1176
|
-
#[inline]
|
1177
|
-
pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
|
1178
|
-
where
|
1179
|
-
F: FnMut(&'a K, &'a V) -> Ordering,
|
1180
|
-
{
|
1181
|
-
self.as_slice().binary_search_by(f)
|
1182
|
-
}
|
1183
|
-
|
1184
|
-
/// Search over a sorted map with an extraction function.
|
1185
|
-
///
|
1186
|
-
/// Returns the position where that value is present, or the position where it can be inserted
|
1187
|
-
/// to maintain the sort. See [`slice::binary_search_by_key`] for more details.
|
1188
|
-
///
|
1189
|
-
/// Computes in **O(log(n))** time.
|
1190
|
-
#[inline]
|
1191
|
-
pub fn binary_search_by_key<'a, B, F>(&'a self, b: &B, f: F) -> Result<usize, usize>
|
1192
|
-
where
|
1193
|
-
F: FnMut(&'a K, &'a V) -> B,
|
1194
|
-
B: Ord,
|
1195
|
-
{
|
1196
|
-
self.as_slice().binary_search_by_key(b, f)
|
1197
|
-
}
|
1198
|
-
|
1199
|
-
/// Returns the index of the partition point of a sorted map according to the given predicate
|
1200
|
-
/// (the index of the first element of the second partition).
|
1201
|
-
///
|
1202
|
-
/// See [`slice::partition_point`] for more details.
|
1203
|
-
///
|
1204
|
-
/// Computes in **O(log(n))** time.
|
1205
|
-
#[must_use]
|
1206
|
-
pub fn partition_point<P>(&self, pred: P) -> usize
|
1207
|
-
where
|
1208
|
-
P: FnMut(&K, &V) -> bool,
|
1209
|
-
{
|
1210
|
-
self.as_slice().partition_point(pred)
|
1211
|
-
}
|
1212
|
-
|
1213
|
-
/// Reverses the order of the map’s key-value pairs in place.
|
1214
|
-
///
|
1215
|
-
/// Computes in **O(n)** time and **O(1)** space.
|
1216
|
-
pub fn reverse(&mut self) {
|
1217
|
-
self.core.reverse()
|
1218
|
-
}
|
1219
|
-
|
1220
|
-
/// Returns a slice of all the key-value pairs in the map.
|
1221
|
-
///
|
1222
|
-
/// Computes in **O(1)** time.
|
1223
|
-
pub fn as_slice(&self) -> &Slice<K, V> {
|
1224
|
-
Slice::from_slice(self.as_entries())
|
1225
|
-
}
|
1226
|
-
|
1227
|
-
/// Returns a mutable slice of all the key-value pairs in the map.
|
1228
|
-
///
|
1229
|
-
/// Computes in **O(1)** time.
|
1230
|
-
pub fn as_mut_slice(&mut self) -> &mut Slice<K, V> {
|
1231
|
-
Slice::from_mut_slice(self.as_entries_mut())
|
1232
|
-
}
|
1233
|
-
|
1234
|
-
/// Converts into a boxed slice of all the key-value pairs in the map.
|
1235
|
-
///
|
1236
|
-
/// Note that this will drop the inner hash table and any excess capacity.
|
1237
|
-
pub fn into_boxed_slice(self) -> Box<Slice<K, V>> {
|
1238
|
-
Slice::from_boxed(self.into_entries().into_boxed_slice())
|
1239
|
-
}
|
1240
|
-
|
1241
|
-
/// Get a key-value pair by index
|
1242
|
-
///
|
1243
|
-
/// Valid indices are `0 <= index < self.len()`.
|
1244
|
-
///
|
1245
|
-
/// Computes in **O(1)** time.
|
1246
|
-
pub fn get_index(&self, index: usize) -> Option<(&K, &V)> {
|
1247
|
-
self.as_entries().get(index).map(Bucket::refs)
|
1248
|
-
}
|
1249
|
-
|
1250
|
-
/// Get a key-value pair by index
|
1251
|
-
///
|
1252
|
-
/// Valid indices are `0 <= index < self.len()`.
|
1253
|
-
///
|
1254
|
-
/// Computes in **O(1)** time.
|
1255
|
-
pub fn get_index_mut(&mut self, index: usize) -> Option<(&K, &mut V)> {
|
1256
|
-
self.as_entries_mut().get_mut(index).map(Bucket::ref_mut)
|
1257
|
-
}
|
1258
|
-
|
1259
|
-
/// Get an entry in the map by index for in-place manipulation.
|
1260
|
-
///
|
1261
|
-
/// Valid indices are `0 <= index < self.len()`.
|
1262
|
-
///
|
1263
|
-
/// Computes in **O(1)** time.
|
1264
|
-
pub fn get_index_entry(&mut self, index: usize) -> Option<IndexedEntry<'_, K, V>> {
|
1265
|
-
if index >= self.len() {
|
1266
|
-
return None;
|
1267
|
-
}
|
1268
|
-
Some(IndexedEntry::new(&mut self.core, index))
|
1269
|
-
}
|
1270
|
-
|
1271
|
-
/// Get an array of `N` key-value pairs by `N` indices
|
1272
|
-
///
|
1273
|
-
/// Valid indices are *0 <= index < self.len()* and each index needs to be unique.
|
1274
|
-
///
|
1275
|
-
/// # Examples
|
1276
|
-
///
|
1277
|
-
/// ```
|
1278
|
-
/// let mut map = indexmap::IndexMap::from([(1, 'a'), (3, 'b'), (2, 'c')]);
|
1279
|
-
/// assert_eq!(map.get_disjoint_indices_mut([2, 0]), Ok([(&2, &mut 'c'), (&1, &mut 'a')]));
|
1280
|
-
/// ```
|
1281
|
-
pub fn get_disjoint_indices_mut<const N: usize>(
|
1282
|
-
&mut self,
|
1283
|
-
indices: [usize; N],
|
1284
|
-
) -> Result<[(&K, &mut V); N], GetDisjointMutError> {
|
1285
|
-
self.as_mut_slice().get_disjoint_mut(indices)
|
1286
|
-
}
|
1287
|
-
|
1288
|
-
/// Returns a slice of key-value pairs in the given range of indices.
|
1289
|
-
///
|
1290
|
-
/// Valid indices are `0 <= index < self.len()`.
|
1291
|
-
///
|
1292
|
-
/// Computes in **O(1)** time.
|
1293
|
-
pub fn get_range<R: RangeBounds<usize>>(&self, range: R) -> Option<&Slice<K, V>> {
|
1294
|
-
let entries = self.as_entries();
|
1295
|
-
let range = try_simplify_range(range, entries.len())?;
|
1296
|
-
entries.get(range).map(Slice::from_slice)
|
1297
|
-
}
|
1298
|
-
|
1299
|
-
/// Returns a mutable slice of key-value pairs in the given range of indices.
|
1300
|
-
///
|
1301
|
-
/// Valid indices are `0 <= index < self.len()`.
|
1302
|
-
///
|
1303
|
-
/// Computes in **O(1)** time.
|
1304
|
-
pub fn get_range_mut<R: RangeBounds<usize>>(&mut self, range: R) -> Option<&mut Slice<K, V>> {
|
1305
|
-
let entries = self.as_entries_mut();
|
1306
|
-
let range = try_simplify_range(range, entries.len())?;
|
1307
|
-
entries.get_mut(range).map(Slice::from_mut_slice)
|
1308
|
-
}
|
1309
|
-
|
1310
|
-
/// Get the first key-value pair
|
1311
|
-
///
|
1312
|
-
/// Computes in **O(1)** time.
|
1313
|
-
#[doc(alias = "first_key_value")] // like `BTreeMap`
|
1314
|
-
pub fn first(&self) -> Option<(&K, &V)> {
|
1315
|
-
self.as_entries().first().map(Bucket::refs)
|
1316
|
-
}
|
1317
|
-
|
1318
|
-
/// Get the first key-value pair, with mutable access to the value
|
1319
|
-
///
|
1320
|
-
/// Computes in **O(1)** time.
|
1321
|
-
pub fn first_mut(&mut self) -> Option<(&K, &mut V)> {
|
1322
|
-
self.as_entries_mut().first_mut().map(Bucket::ref_mut)
|
1323
|
-
}
|
1324
|
-
|
1325
|
-
/// Get the first entry in the map for in-place manipulation.
|
1326
|
-
///
|
1327
|
-
/// Computes in **O(1)** time.
|
1328
|
-
pub fn first_entry(&mut self) -> Option<IndexedEntry<'_, K, V>> {
|
1329
|
-
self.get_index_entry(0)
|
1330
|
-
}
|
1331
|
-
|
1332
|
-
/// Get the last key-value pair
|
1333
|
-
///
|
1334
|
-
/// Computes in **O(1)** time.
|
1335
|
-
#[doc(alias = "last_key_value")] // like `BTreeMap`
|
1336
|
-
pub fn last(&self) -> Option<(&K, &V)> {
|
1337
|
-
self.as_entries().last().map(Bucket::refs)
|
1338
|
-
}
|
1339
|
-
|
1340
|
-
/// Get the last key-value pair, with mutable access to the value
|
1341
|
-
///
|
1342
|
-
/// Computes in **O(1)** time.
|
1343
|
-
pub fn last_mut(&mut self) -> Option<(&K, &mut V)> {
|
1344
|
-
self.as_entries_mut().last_mut().map(Bucket::ref_mut)
|
1345
|
-
}
|
1346
|
-
|
1347
|
-
/// Get the last entry in the map for in-place manipulation.
|
1348
|
-
///
|
1349
|
-
/// Computes in **O(1)** time.
|
1350
|
-
pub fn last_entry(&mut self) -> Option<IndexedEntry<'_, K, V>> {
|
1351
|
-
self.get_index_entry(self.len().checked_sub(1)?)
|
1352
|
-
}
|
1353
|
-
|
1354
|
-
/// Remove the key-value pair by index
|
1355
|
-
///
|
1356
|
-
/// Valid indices are `0 <= index < self.len()`.
|
1357
|
-
///
|
1358
|
-
/// Like [`Vec::swap_remove`], the pair is removed by swapping it with the
|
1359
|
-
/// last element of the map and popping it off. **This perturbs
|
1360
|
-
/// the position of what used to be the last element!**
|
1361
|
-
///
|
1362
|
-
/// Computes in **O(1)** time (average).
|
1363
|
-
pub fn swap_remove_index(&mut self, index: usize) -> Option<(K, V)> {
|
1364
|
-
self.core.swap_remove_index(index)
|
1365
|
-
}
|
1366
|
-
|
1367
|
-
/// Remove the key-value pair by index
|
1368
|
-
///
|
1369
|
-
/// Valid indices are `0 <= index < self.len()`.
|
1370
|
-
///
|
1371
|
-
/// Like [`Vec::remove`], the pair is removed by shifting all of the
|
1372
|
-
/// elements that follow it, preserving their relative order.
|
1373
|
-
/// **This perturbs the index of all of those elements!**
|
1374
|
-
///
|
1375
|
-
/// Computes in **O(n)** time (average).
|
1376
|
-
pub fn shift_remove_index(&mut self, index: usize) -> Option<(K, V)> {
|
1377
|
-
self.core.shift_remove_index(index)
|
1378
|
-
}
|
1379
|
-
|
1380
|
-
/// Moves the position of a key-value pair from one index to another
|
1381
|
-
/// by shifting all other pairs in-between.
|
1382
|
-
///
|
1383
|
-
/// * If `from < to`, the other pairs will shift down while the targeted pair moves up.
|
1384
|
-
/// * If `from > to`, the other pairs will shift up while the targeted pair moves down.
|
1385
|
-
///
|
1386
|
-
/// ***Panics*** if `from` or `to` are out of bounds.
|
1387
|
-
///
|
1388
|
-
/// Computes in **O(n)** time (average).
|
1389
|
-
#[track_caller]
|
1390
|
-
pub fn move_index(&mut self, from: usize, to: usize) {
|
1391
|
-
self.core.move_index(from, to)
|
1392
|
-
}
|
1393
|
-
|
1394
|
-
/// Swaps the position of two key-value pairs in the map.
|
1395
|
-
///
|
1396
|
-
/// ***Panics*** if `a` or `b` are out of bounds.
|
1397
|
-
///
|
1398
|
-
/// Computes in **O(1)** time (average).
|
1399
|
-
#[track_caller]
|
1400
|
-
pub fn swap_indices(&mut self, a: usize, b: usize) {
|
1401
|
-
self.core.swap_indices(a, b)
|
1402
|
-
}
|
1403
|
-
}
|
1404
|
-
|
1405
|
-
/// Access [`IndexMap`] values corresponding to a key.
|
1406
|
-
///
|
1407
|
-
/// # Examples
|
1408
|
-
///
|
1409
|
-
/// ```
|
1410
|
-
/// use indexmap::IndexMap;
|
1411
|
-
///
|
1412
|
-
/// let mut map = IndexMap::new();
|
1413
|
-
/// for word in "Lorem ipsum dolor sit amet".split_whitespace() {
|
1414
|
-
/// map.insert(word.to_lowercase(), word.to_uppercase());
|
1415
|
-
/// }
|
1416
|
-
/// assert_eq!(map["lorem"], "LOREM");
|
1417
|
-
/// assert_eq!(map["ipsum"], "IPSUM");
|
1418
|
-
/// ```
|
1419
|
-
///
|
1420
|
-
/// ```should_panic
|
1421
|
-
/// use indexmap::IndexMap;
|
1422
|
-
///
|
1423
|
-
/// let mut map = IndexMap::new();
|
1424
|
-
/// map.insert("foo", 1);
|
1425
|
-
/// println!("{:?}", map["bar"]); // panics!
|
1426
|
-
/// ```
|
1427
|
-
impl<K, V, Q: ?Sized, S> Index<&Q> for IndexMap<K, V, S>
|
1428
|
-
where
|
1429
|
-
Q: Hash + Equivalent<K>,
|
1430
|
-
S: BuildHasher,
|
1431
|
-
{
|
1432
|
-
type Output = V;
|
1433
|
-
|
1434
|
-
/// Returns a reference to the value corresponding to the supplied `key`.
|
1435
|
-
///
|
1436
|
-
/// ***Panics*** if `key` is not present in the map.
|
1437
|
-
fn index(&self, key: &Q) -> &V {
|
1438
|
-
self.get(key).expect("no entry found for key")
|
1439
|
-
}
|
1440
|
-
}
|
1441
|
-
|
1442
|
-
/// Access [`IndexMap`] values corresponding to a key.
|
1443
|
-
///
|
1444
|
-
/// Mutable indexing allows changing / updating values of key-value
|
1445
|
-
/// pairs that are already present.
|
1446
|
-
///
|
1447
|
-
/// You can **not** insert new pairs with index syntax, use `.insert()`.
|
1448
|
-
///
|
1449
|
-
/// # Examples
|
1450
|
-
///
|
1451
|
-
/// ```
|
1452
|
-
/// use indexmap::IndexMap;
|
1453
|
-
///
|
1454
|
-
/// let mut map = IndexMap::new();
|
1455
|
-
/// for word in "Lorem ipsum dolor sit amet".split_whitespace() {
|
1456
|
-
/// map.insert(word.to_lowercase(), word.to_string());
|
1457
|
-
/// }
|
1458
|
-
/// let lorem = &mut map["lorem"];
|
1459
|
-
/// assert_eq!(lorem, "Lorem");
|
1460
|
-
/// lorem.retain(char::is_lowercase);
|
1461
|
-
/// assert_eq!(map["lorem"], "orem");
|
1462
|
-
/// ```
|
1463
|
-
///
|
1464
|
-
/// ```should_panic
|
1465
|
-
/// use indexmap::IndexMap;
|
1466
|
-
///
|
1467
|
-
/// let mut map = IndexMap::new();
|
1468
|
-
/// map.insert("foo", 1);
|
1469
|
-
/// map["bar"] = 1; // panics!
|
1470
|
-
/// ```
|
1471
|
-
impl<K, V, Q: ?Sized, S> IndexMut<&Q> for IndexMap<K, V, S>
|
1472
|
-
where
|
1473
|
-
Q: Hash + Equivalent<K>,
|
1474
|
-
S: BuildHasher,
|
1475
|
-
{
|
1476
|
-
/// Returns a mutable reference to the value corresponding to the supplied `key`.
|
1477
|
-
///
|
1478
|
-
/// ***Panics*** if `key` is not present in the map.
|
1479
|
-
fn index_mut(&mut self, key: &Q) -> &mut V {
|
1480
|
-
self.get_mut(key).expect("no entry found for key")
|
1481
|
-
}
|
1482
|
-
}
|
1483
|
-
|
1484
|
-
/// Access [`IndexMap`] values at indexed positions.
|
1485
|
-
///
|
1486
|
-
/// See [`Index<usize> for Keys`][keys] to access a map's keys instead.
|
1487
|
-
///
|
1488
|
-
/// [keys]: Keys#impl-Index<usize>-for-Keys<'a,+K,+V>
|
1489
|
-
///
|
1490
|
-
/// # Examples
|
1491
|
-
///
|
1492
|
-
/// ```
|
1493
|
-
/// use indexmap::IndexMap;
|
1494
|
-
///
|
1495
|
-
/// let mut map = IndexMap::new();
|
1496
|
-
/// for word in "Lorem ipsum dolor sit amet".split_whitespace() {
|
1497
|
-
/// map.insert(word.to_lowercase(), word.to_uppercase());
|
1498
|
-
/// }
|
1499
|
-
/// assert_eq!(map[0], "LOREM");
|
1500
|
-
/// assert_eq!(map[1], "IPSUM");
|
1501
|
-
/// map.reverse();
|
1502
|
-
/// assert_eq!(map[0], "AMET");
|
1503
|
-
/// assert_eq!(map[1], "SIT");
|
1504
|
-
/// map.sort_keys();
|
1505
|
-
/// assert_eq!(map[0], "AMET");
|
1506
|
-
/// assert_eq!(map[1], "DOLOR");
|
1507
|
-
/// ```
|
1508
|
-
///
|
1509
|
-
/// ```should_panic
|
1510
|
-
/// use indexmap::IndexMap;
|
1511
|
-
///
|
1512
|
-
/// let mut map = IndexMap::new();
|
1513
|
-
/// map.insert("foo", 1);
|
1514
|
-
/// println!("{:?}", map[10]); // panics!
|
1515
|
-
/// ```
|
1516
|
-
impl<K, V, S> Index<usize> for IndexMap<K, V, S> {
|
1517
|
-
type Output = V;
|
1518
|
-
|
1519
|
-
/// Returns a reference to the value at the supplied `index`.
|
1520
|
-
///
|
1521
|
-
/// ***Panics*** if `index` is out of bounds.
|
1522
|
-
fn index(&self, index: usize) -> &V {
|
1523
|
-
if let Some((_, value)) = self.get_index(index) {
|
1524
|
-
value
|
1525
|
-
} else {
|
1526
|
-
panic!(
|
1527
|
-
"index out of bounds: the len is {len} but the index is {index}",
|
1528
|
-
len = self.len()
|
1529
|
-
);
|
1530
|
-
}
|
1531
|
-
}
|
1532
|
-
}
|
1533
|
-
|
1534
|
-
/// Access [`IndexMap`] values at indexed positions.
|
1535
|
-
///
|
1536
|
-
/// Mutable indexing allows changing / updating indexed values
|
1537
|
-
/// that are already present.
|
1538
|
-
///
|
1539
|
-
/// You can **not** insert new values with index syntax -- use [`.insert()`][IndexMap::insert].
|
1540
|
-
///
|
1541
|
-
/// # Examples
|
1542
|
-
///
|
1543
|
-
/// ```
|
1544
|
-
/// use indexmap::IndexMap;
|
1545
|
-
///
|
1546
|
-
/// let mut map = IndexMap::new();
|
1547
|
-
/// for word in "Lorem ipsum dolor sit amet".split_whitespace() {
|
1548
|
-
/// map.insert(word.to_lowercase(), word.to_string());
|
1549
|
-
/// }
|
1550
|
-
/// let lorem = &mut map[0];
|
1551
|
-
/// assert_eq!(lorem, "Lorem");
|
1552
|
-
/// lorem.retain(char::is_lowercase);
|
1553
|
-
/// assert_eq!(map["lorem"], "orem");
|
1554
|
-
/// ```
|
1555
|
-
///
|
1556
|
-
/// ```should_panic
|
1557
|
-
/// use indexmap::IndexMap;
|
1558
|
-
///
|
1559
|
-
/// let mut map = IndexMap::new();
|
1560
|
-
/// map.insert("foo", 1);
|
1561
|
-
/// map[10] = 1; // panics!
|
1562
|
-
/// ```
|
1563
|
-
impl<K, V, S> IndexMut<usize> for IndexMap<K, V, S> {
|
1564
|
-
/// Returns a mutable reference to the value at the supplied `index`.
|
1565
|
-
///
|
1566
|
-
/// ***Panics*** if `index` is out of bounds.
|
1567
|
-
fn index_mut(&mut self, index: usize) -> &mut V {
|
1568
|
-
let len: usize = self.len();
|
1569
|
-
|
1570
|
-
if let Some((_, value)) = self.get_index_mut(index) {
|
1571
|
-
value
|
1572
|
-
} else {
|
1573
|
-
panic!("index out of bounds: the len is {len} but the index is {index}");
|
1574
|
-
}
|
1575
|
-
}
|
1576
|
-
}
|
1577
|
-
|
1578
|
-
impl<K, V, S> FromIterator<(K, V)> for IndexMap<K, V, S>
|
1579
|
-
where
|
1580
|
-
K: Hash + Eq,
|
1581
|
-
S: BuildHasher + Default,
|
1582
|
-
{
|
1583
|
-
/// Create an `IndexMap` from the sequence of key-value pairs in the
|
1584
|
-
/// iterable.
|
1585
|
-
///
|
1586
|
-
/// `from_iter` uses the same logic as `extend`. See
|
1587
|
-
/// [`extend`][IndexMap::extend] for more details.
|
1588
|
-
fn from_iter<I: IntoIterator<Item = (K, V)>>(iterable: I) -> Self {
|
1589
|
-
let iter = iterable.into_iter();
|
1590
|
-
let (low, _) = iter.size_hint();
|
1591
|
-
let mut map = Self::with_capacity_and_hasher(low, <_>::default());
|
1592
|
-
map.extend(iter);
|
1593
|
-
map
|
1594
|
-
}
|
1595
|
-
}
|
1596
|
-
|
1597
|
-
#[cfg(feature = "std")]
|
1598
|
-
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
|
1599
|
-
impl<K, V, const N: usize> From<[(K, V); N]> for IndexMap<K, V, RandomState>
|
1600
|
-
where
|
1601
|
-
K: Hash + Eq,
|
1602
|
-
{
|
1603
|
-
/// # Examples
|
1604
|
-
///
|
1605
|
-
/// ```
|
1606
|
-
/// use indexmap::IndexMap;
|
1607
|
-
///
|
1608
|
-
/// let map1 = IndexMap::from([(1, 2), (3, 4)]);
|
1609
|
-
/// let map2: IndexMap<_, _> = [(1, 2), (3, 4)].into();
|
1610
|
-
/// assert_eq!(map1, map2);
|
1611
|
-
/// ```
|
1612
|
-
fn from(arr: [(K, V); N]) -> Self {
|
1613
|
-
Self::from_iter(arr)
|
1614
|
-
}
|
1615
|
-
}
|
1616
|
-
|
1617
|
-
impl<K, V, S> Extend<(K, V)> for IndexMap<K, V, S>
|
1618
|
-
where
|
1619
|
-
K: Hash + Eq,
|
1620
|
-
S: BuildHasher,
|
1621
|
-
{
|
1622
|
-
/// Extend the map with all key-value pairs in the iterable.
|
1623
|
-
///
|
1624
|
-
/// This is equivalent to calling [`insert`][IndexMap::insert] for each of
|
1625
|
-
/// them in order, which means that for keys that already existed
|
1626
|
-
/// in the map, their value is updated but it keeps the existing order.
|
1627
|
-
///
|
1628
|
-
/// New keys are inserted in the order they appear in the sequence. If
|
1629
|
-
/// equivalents of a key occur more than once, the last corresponding value
|
1630
|
-
/// prevails.
|
1631
|
-
fn extend<I: IntoIterator<Item = (K, V)>>(&mut self, iterable: I) {
|
1632
|
-
// (Note: this is a copy of `std`/`hashbrown`'s reservation logic.)
|
1633
|
-
// Keys may be already present or show multiple times in the iterator.
|
1634
|
-
// Reserve the entire hint lower bound if the map is empty.
|
1635
|
-
// Otherwise reserve half the hint (rounded up), so the map
|
1636
|
-
// will only resize twice in the worst case.
|
1637
|
-
let iter = iterable.into_iter();
|
1638
|
-
let reserve = if self.is_empty() {
|
1639
|
-
iter.size_hint().0
|
1640
|
-
} else {
|
1641
|
-
(iter.size_hint().0 + 1) / 2
|
1642
|
-
};
|
1643
|
-
self.reserve(reserve);
|
1644
|
-
iter.for_each(move |(k, v)| {
|
1645
|
-
self.insert(k, v);
|
1646
|
-
});
|
1647
|
-
}
|
1648
|
-
}
|
1649
|
-
|
1650
|
-
impl<'a, K, V, S> Extend<(&'a K, &'a V)> for IndexMap<K, V, S>
|
1651
|
-
where
|
1652
|
-
K: Hash + Eq + Copy,
|
1653
|
-
V: Copy,
|
1654
|
-
S: BuildHasher,
|
1655
|
-
{
|
1656
|
-
/// Extend the map with all key-value pairs in the iterable.
|
1657
|
-
///
|
1658
|
-
/// See the first extend method for more details.
|
1659
|
-
fn extend<I: IntoIterator<Item = (&'a K, &'a V)>>(&mut self, iterable: I) {
|
1660
|
-
self.extend(iterable.into_iter().map(|(&key, &value)| (key, value)));
|
1661
|
-
}
|
1662
|
-
}
|
1663
|
-
|
1664
|
-
impl<K, V, S> Default for IndexMap<K, V, S>
|
1665
|
-
where
|
1666
|
-
S: Default,
|
1667
|
-
{
|
1668
|
-
/// Return an empty [`IndexMap`]
|
1669
|
-
fn default() -> Self {
|
1670
|
-
Self::with_capacity_and_hasher(0, S::default())
|
1671
|
-
}
|
1672
|
-
}
|
1673
|
-
|
1674
|
-
impl<K, V1, S1, V2, S2> PartialEq<IndexMap<K, V2, S2>> for IndexMap<K, V1, S1>
|
1675
|
-
where
|
1676
|
-
K: Hash + Eq,
|
1677
|
-
V1: PartialEq<V2>,
|
1678
|
-
S1: BuildHasher,
|
1679
|
-
S2: BuildHasher,
|
1680
|
-
{
|
1681
|
-
fn eq(&self, other: &IndexMap<K, V2, S2>) -> bool {
|
1682
|
-
if self.len() != other.len() {
|
1683
|
-
return false;
|
1684
|
-
}
|
1685
|
-
|
1686
|
-
self.iter()
|
1687
|
-
.all(|(key, value)| other.get(key).map_or(false, |v| *value == *v))
|
1688
|
-
}
|
1689
|
-
}
|
1690
|
-
|
1691
|
-
impl<K, V, S> Eq for IndexMap<K, V, S>
|
1692
|
-
where
|
1693
|
-
K: Eq + Hash,
|
1694
|
-
V: Eq,
|
1695
|
-
S: BuildHasher,
|
1696
|
-
{
|
1697
|
-
}
|