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