web search done right
fix clippy warnings
Mikkel Denkera3292143d3bd
diff --git a/assets/licenses.html b/assets/licenses.htmlindex 43c52d66..f7f7f2f2 100644--- a/assets/licenses.html+++ b/assets/licenses.html@@ -44,11 +44,11 @@<h2>Overview of licenses:</h2><ul class="licenses-overview">- <li><a href="#Apache-2.0">Apache License 2.0</a> (423)</li>- <li><a href="#MIT">MIT License</a> (202)</li>+ <li><a href="#Apache-2.0">Apache License 2.0</a> (439)</li>+ <li><a href="#MIT">MIT License</a> (197)</li><li><a href="#BSD-3-Clause">BSD 3-Clause "New" or "Revised" License</a> (9)</li><li><a href="#MPL-2.0">Mozilla Public License 2.0</a> (8)</li>- <li><a href="#AGPL-3.0">GNU Affero General Public License v3.0</a> (4)</li>+ <li><a href="#AGPL-3.0">GNU Affero General Public License v3.0</a> (5)</li><li><a href="#ISC">ISC License</a> (4)</li><li><a href="#Unicode-3.0">Unicode License v3</a> (4)</li><li><a href="#BSD-2-Clause">BSD 2-Clause "Simplified" License</a> (3)</li>@@ -70,6 +70,7 @@<ul class="license-used-by"><li><a href=" https://crates.io/crates/bloom ">bloom 0.1.0</a></li><li><a href=" https://crates.io/crates/file_store ">file_store 0.1.0</a></li>+ <li><a href=" https://crates.io/crates/ownedbytes ">ownedbytes 0.1.0</a></li><li><a href=" https://crates.io/crates/robotstxt ">robotstxt 0.1.0</a></li><li><a href=" https://crates.io/crates/speedy_kv ">speedy_kv 0.1.0</a></li></ul>@@ -1540,6 +1541,7 @@ You should also get your employer (if you work as a programmer) or school, if an<li><a href=" https://github.com/hsivonen/chardetng ">chardetng 0.1.17</a></li><li><a href=" https://github.com/tormol/encode_unicode ">encode_unicode 0.3.6</a></li><li><a href=" https://github.com/hsivonen/encoding_rs ">encoding_rs 0.8.34</a></li>+ <li><a href=" https://github.com/thomcc/rust-more-asserts ">more-asserts 0.3.1</a></li><li><a href=" https://github.com/nvzqz/static-assertions-rs ">static_assertions 1.1.0</a></li><li><a href=" https://github.com/RustCrypto/utils/tree/master/zeroize ">zeroize 1.8.1</a></li></ul>@@ -2837,7 +2839,7 @@ Software.<h3 id="Apache-2.0">Apache License 2.0</h3><h4>Used by:</h4><ul class="license-used-by">- <li><a href=" https://github.com/mheffner/rust-sketches-ddsketch ">sketches-ddsketch 0.2.2</a></li>+ <li><a href=" https://github.com/mheffner/rust-sketches-ddsketch ">sketches-ddsketch 0.3.0</a></li></ul><pre class="license-text"> Apache LicenseVersion 2.0, January 2004@@ -4103,6 +4105,215 @@ Software.See the License for the specific language governing permissions andlimitations under the License.+</pre>+ </li>+ <li class="license">+ <h3 id="Apache-2.0">Apache License 2.0</h3>+ <h4>Used by:</h4>+ <ul class="license-used-by">+ <li><a href=" https://github.com/tikv/fail-rs ">fail 0.5.1</a></li>+ </ul>+ <pre class="license-text"> Apache License+ Version 2.0, January 2004+ http://www.apache.org/licenses/++ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION++ 1. Definitions.++ "License" shall mean the terms and conditions for use, reproduction,+ and distribution as defined by Sections 1 through 9 of this document.++ "Licensor" shall mean the copyright owner or entity authorized by+ the copyright owner that is granting the License.++ "Legal Entity" shall mean the union of the acting entity and all+ other entities that control, are controlled by, or are under common+ control with that entity. For the purposes of this definition,+ "control" means (i) the power, direct or indirect, to cause the+ direction or management of such entity, whether by contract or+ otherwise, or (ii) ownership of fifty percent (50%) or more of the+ outstanding shares, or (iii) beneficial ownership of such entity.++ "You" (or "Your") shall mean an individual or Legal Entity+ exercising permissions granted by this License.++ "Source" form shall mean the preferred form for making modifications,+ including but not limited to software source code, documentation+ source, and configuration files.++ "Object" form shall mean any form resulting from mechanical+ transformation or translation of a Source form, including but+ not limited to compiled object code, generated documentation,+ and conversions to other media types.++ "Work" shall mean the work of authorship, whether in Source or+ Object form, made available under the License, as indicated by a+ copyright notice that is included in or attached to the work+ (an example is provided in the Appendix below).++ "Derivative Works" shall mean any work, whether in Source or Object+ form, that is based on (or derived from) the Work and for which the+ editorial revisions, annotations, elaborations, or other modifications+ represent, as a whole, an original work of authorship. For the purposes+ of this License, Derivative Works shall not include works that remain+ separable from, or merely link (or bind by name) to the interfaces of,+ the Work and Derivative Works thereof.++ "Contribution" shall mean any work of authorship, including+ the original version of the Work and any modifications or additions+ to that Work or Derivative Works thereof, that is intentionally+ submitted to Licensor for inclusion in the Work by the copyright owner+ or by an individual or Legal Entity authorized to submit on behalf of+ the copyright owner. For the purposes of this definition, "submitted"+ means any form of electronic, verbal, or written communication sent+ to the Licensor or its representatives, including but not limited to+ communication on electronic mailing lists, source code control systems,+ and issue tracking systems that are managed by, or on behalf of, the+ Licensor for the purpose of discussing and improving the Work, but+ excluding communication that is conspicuously marked or otherwise+ designated in writing by the copyright owner as "Not a Contribution."++ "Contributor" shall mean Licensor and any individual or Legal Entity+ on behalf of whom a Contribution has been received by Licensor and+ subsequently incorporated within the Work.++ 2. Grant of Copyright License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ copyright license to reproduce, prepare Derivative Works of,+ publicly display, publicly perform, sublicense, and distribute the+ Work and such Derivative Works in Source or Object form.++ 3. Grant of Patent License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ (except as stated in this section) patent license to make, have made,+ use, offer to sell, sell, import, and otherwise transfer the Work,+ where such license applies only to those patent claims licensable+ by such Contributor that are necessarily infringed by their+ Contribution(s) alone or by combination of their Contribution(s)+ with the Work to which such Contribution(s) was submitted. If You+ institute patent litigation against any entity (including a+ cross-claim or counterclaim in a lawsuit) alleging that the Work+ or a Contribution incorporated within the Work constitutes direct+ or contributory patent infringement, then any patent licenses+ granted to You under this License for that Work shall terminate+ as of the date such litigation is filed.++ 4. Redistribution. You may reproduce and distribute copies of the+ Work or Derivative Works thereof in any medium, with or without+ modifications, and in Source or Object form, provided that You+ meet the following conditions:++ (a) You must give any other recipients of the Work or+ Derivative Works a copy of this License; and++ (b) You must cause any modified files to carry prominent notices+ stating that You changed the files; and++ (c) You must retain, in the Source form of any Derivative Works+ that You distribute, all copyright, patent, trademark, and+ attribution notices from the Source form of the Work,+ excluding those notices that do not pertain to any part of+ the Derivative Works; and++ (d) If the Work includes a "NOTICE" text file as part of its+ distribution, then any Derivative Works that You distribute must+ include a readable copy of the attribution notices contained+ within such NOTICE file, excluding those notices that do not+ pertain to any part of the Derivative Works, in at least one+ of the following places: within a NOTICE text file distributed+ as part of the Derivative Works; within the Source form or+ documentation, if provided along with the Derivative Works; or,+ within a display generated by the Derivative Works, if and+ wherever such third-party notices normally appear. The contents+ of the NOTICE file are for informational purposes only and+ do not modify the License. You may add Your own attribution+ notices within Derivative Works that You distribute, alongside+ or as an addendum to the NOTICE text from the Work, provided+ that such additional attribution notices cannot be construed+ as modifying the License.++ You may add Your own copyright statement to Your modifications and+ may provide additional or different license terms and conditions+ for use, reproduction, or distribution of Your modifications, or+ for any such Derivative Works as a whole, provided Your use,+ reproduction, and distribution of the Work otherwise complies with+ the conditions stated in this License.++ 5. Submission of Contributions. Unless You explicitly state otherwise,+ any Contribution intentionally submitted for inclusion in the Work+ by You to the Licensor shall be under the terms and conditions of+ this License, without any additional terms or conditions.+ Notwithstanding the above, nothing herein shall supersede or modify+ the terms of any separate license agreement you may have executed+ with Licensor regarding such Contributions.++ 6. Trademarks. This License does not grant permission to use the trade+ names, trademarks, service marks, or product names of the Licensor,+ except as required for reasonable and customary use in describing the+ origin of the Work and reproducing the content of the NOTICE file.++ 7. Disclaimer of Warranty. Unless required by applicable law or+ agreed to in writing, Licensor provides the Work (and each+ Contributor provides its Contributions) on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or+ implied, including, without limitation, any warranties or conditions+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A+ PARTICULAR PURPOSE. You are solely responsible for determining the+ appropriateness of using or redistributing the Work and assume any+ risks associated with Your exercise of permissions under this License.++ 8. Limitation of Liability. In no event and under no legal theory,+ whether in tort (including negligence), contract, or otherwise,+ unless required by applicable law (such as deliberate and grossly+ negligent acts) or agreed to in writing, shall any Contributor be+ liable to You for damages, including any direct, indirect, special,+ incidental, or consequential damages of any character arising as a+ result of this License or out of the use or inability to use the+ Work (including but not limited to damages for loss of goodwill,+ work stoppage, computer failure or malfunction, or any and all+ other commercial damages or losses), even if such Contributor+ has been advised of the possibility of such damages.++ 9. Accepting Warranty or Additional Liability. While redistributing+ the Work or Derivative Works thereof, You may choose to offer,+ and charge a fee for, acceptance of support, warranty, indemnity,+ or other liability obligations and/or rights consistent with this+ License. However, in accepting such obligations, You may act only+ on Your own behalf and on Your sole responsibility, not on behalf+ of any other Contributor, and only if You agree to indemnify,+ defend, and hold each Contributor harmless for any liability+ incurred by, or claims asserted against, such Contributor by reason+ of your accepting any such warranty or additional liability.++ END OF TERMS AND CONDITIONS++ APPENDIX: How to apply the Apache License to your work.++ To apply the Apache License to your work, attach the following+ boilerplate notice, with the fields enclosed by brackets "{}"+ replaced with your own identifying information. (Don't include+ the brackets!) The text should be enclosed in the appropriate+ comment syntax for the file format. We also recommend that a+ file or class name and description of purpose be included on the+ same "printed page" as the copyright notice for easier+ identification within third-party archives.++ Copyright 2019 TiKV Project Authors.++ Licensed under the Apache License, Version 2.0 (the "License");+ you may not use this file except in compliance with the License.+ You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++ Unless required by applicable law or agreed to in writing, software+ distributed under the License is distributed on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ See the License for the specific language governing permissions and+ limitations under the License.</pre></li><li class="license">@@ -4112,7 +4323,9 @@ Software.<li><a href=" https://github.com/rust-cli/anstyle.git ">anstyle-parse 0.2.4</a></li><li><a href=" https://github.com/phil-opp/rust-bit-field ">bit_field 0.10.2</a></li><li><a href=" https://github.com/llogiq/bytecount ">bytecount 0.6.8</a></li>+ <li><a href=" https://github.com/utkarshkukreti/diff.rs ">diff 0.1.13</a></li><li><a href=" https://github.com/retep998/winapi-rs ">winapi 0.3.9</a></li>+ <li><a href=" https://github.com/jonhoo/rust-zipf ">zipf 7.0.1</a></li></ul><pre class="license-text"> Apache LicenseVersion 2.0, January 2004@@ -4333,12 +4546,15 @@ Software.<li><a href=" https://github.com/colin-kiegel/rust-derive-builder ">derive_builder_core 0.12.0</a></li><li><a href=" https://github.com/colin-kiegel/rust-derive-builder ">derive_builder_macro 0.12.0</a></li><li><a href=" https://github.com/bluejekyll/enum-as-inner ">enum-as-inner 0.6.0</a></li>+ <li><a href=" https://github.com/rust-cli/env_logger ">env_filter 0.1.0</a></li>+ <li><a href=" https://github.com/rust-cli/env_logger ">env_logger 0.11.3</a></li><li><a href=" https://github.com/sfackler/foreign-types ">foreign-types-shared 0.1.1</a></li><li><a href=" https://github.com/sfackler/foreign-types ">foreign-types 0.3.2</a></li><li><a href=" https://github.com/KokaKiwi/rust-hex ">hex 0.4.3</a></li><li><a href=" https://github.com/polyfill-rs/is_terminal_polyfill ">is_terminal_polyfill 1.70.0</a></li><li><a href=" https://github.com/sfackler/rust-native-tls ">native-tls 0.2.12</a></li><li><a href=" https://crates.io/crates/openssl-macros ">openssl-macros 0.1.1</a></li>+ <li><a href=" https://github.com/rust-pretty-assertions/rust-pretty-assertions ">pretty_assertions 1.4.0</a></li><li><a href=" http://github.com/tailhook/quick-error ">quick-error 1.2.3</a></li><li><a href=" http://github.com/tailhook/quick-error ">quick-error 2.0.1</a></li><li><a href=" https://github.com/toml-rs/toml ">serde_spanned 0.6.6</a></li>@@ -5153,13 +5369,226 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTIONdefend, and hold each Contributor harmless for any liabilityincurred by, or claims asserted against, such Contributor by reasonof your accepting any such warranty or additional liability.-</pre>+</pre>+ </li>+ <li class="license">+ <h3 id="Apache-2.0">Apache License 2.0</h3>+ <h4>Used by:</h4>+ <ul class="license-used-by">+ <li><a href=" https://github.com/sgodwincs/dlv-list-rs ">dlv-list 0.5.2</a></li>+ </ul>+ <pre class="license-text"> Apache License+ Version 2.0, January 2004+ http://www.apache.org/licenses/++TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION++1. Definitions.++ "License" shall mean the terms and conditions for use, reproduction,+ and distribution as defined by Sections 1 through 9 of this document.++ "Licensor" shall mean the copyright owner or entity authorized by+ the copyright owner that is granting the License.++ "Legal Entity" shall mean the union of the acting entity and all+ other entities that control, are controlled by, or are under common+ control with that entity. For the purposes of this definition,+ "control" means (i) the power, direct or indirect, to cause the+ direction or management of such entity, whether by contract or+ otherwise, or (ii) ownership of fifty percent (50%) or more of the+ outstanding shares, or (iii) beneficial ownership of such entity.++ "You" (or "Your") shall mean an individual or Legal Entity+ exercising permissions granted by this License.++ "Source" form shall mean the preferred form for making modifications,+ including but not limited to software source code, documentation+ source, and configuration files.++ "Object" form shall mean any form resulting from mechanical+ transformation or translation of a Source form, including but+ not limited to compiled object code, generated documentation,+ and conversions to other media types.++ "Work" shall mean the work of authorship, whether in Source or+ Object form, made available under the License, as indicated by a+ copyright notice that is included in or attached to the work+ (an example is provided in the Appendix below).++ "Derivative Works" shall mean any work, whether in Source or Object+ form, that is based on (or derived from) the Work and for which the+ editorial revisions, annotations, elaborations, or other modifications+ represent, as a whole, an original work of authorship. For the purposes+ of this License, Derivative Works shall not include works that remain+ separable from, or merely link (or bind by name) to the interfaces of,+ the Work and Derivative Works thereof.++ "Contribution" shall mean any work of authorship, including+ the original version of the Work and any modifications or additions+ to that Work or Derivative Works thereof, that is intentionally+ submitted to Licensor for inclusion in the Work by the copyright owner+ or by an individual or Legal Entity authorized to submit on behalf of+ the copyright owner. For the purposes of this definition, "submitted"+ means any form of electronic, verbal, or written communication sent+ to the Licensor or its representatives, including but not limited to+ communication on electronic mailing lists, source code control systems,+ and issue tracking systems that are managed by, or on behalf of, the+ Licensor for the purpose of discussing and improving the Work, but+ excluding communication that is conspicuously marked or otherwise+ designated in writing by the copyright owner as "Not a Contribution."++ "Contributor" shall mean Licensor and any individual or Legal Entity+ on behalf of whom a Contribution has been received by Licensor and+ subsequently incorporated within the Work.++2. Grant of Copyright License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ copyright license to reproduce, prepare Derivative Works of,+ publicly display, publicly perform, sublicense, and distribute the+ Work and such Derivative Works in Source or Object form.++3. Grant of Patent License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ (except as stated in this section) patent license to make, have made,+ use, offer to sell, sell, import, and otherwise transfer the Work,+ where such license applies only to those patent claims licensable+ by such Contributor that are necessarily infringed by their+ Contribution(s) alone or by combination of their Contribution(s)+ with the Work to which such Contribution(s) was submitted. If You+ institute patent litigation against any entity (including a+ cross-claim or counterclaim in a lawsuit) alleging that the Work+ or a Contribution incorporated within the Work constitutes direct+ or contributory patent infringement, then any patent licenses+ granted to You under this License for that Work shall terminate+ as of the date such litigation is filed.++4. Redistribution. You may reproduce and distribute copies of the+ Work or Derivative Works thereof in any medium, with or without+ modifications, and in Source or Object form, provided that You+ meet the following conditions:++ (a) You must give any other recipients of the Work or+ Derivative Works a copy of this License; and++ (b) You must cause any modified files to carry prominent notices+ stating that You changed the files; and++ (c) You must retain, in the Source form of any Derivative Works+ that You distribute, all copyright, patent, trademark, and+ attribution notices from the Source form of the Work,+ excluding those notices that do not pertain to any part of+ the Derivative Works; and++ (d) If the Work includes a "NOTICE" text file as part of its+ distribution, then any Derivative Works that You distribute must+ include a readable copy of the attribution notices contained+ within such NOTICE file, excluding those notices that do not+ pertain to any part of the Derivative Works, in at least one+ of the following places: within a NOTICE text file distributed+ as part of the Derivative Works; within the Source form or+ documentation, if provided along with the Derivative Works; or,+ within a display generated by the Derivative Works, if and+ wherever such third-party notices normally appear. The contents+ of the NOTICE file are for informational purposes only and+ do not modify the License. You may add Your own attribution+ notices within Derivative Works that You distribute, alongside+ or as an addendum to the NOTICE text from the Work, provided+ that such additional attribution notices cannot be construed+ as modifying the License.++ You may add Your own copyright statement to Your modifications and+ may provide additional or different license terms and conditions+ for use, reproduction, or distribution of Your modifications, or+ for any such Derivative Works as a whole, provided Your use,+ reproduction, and distribution of the Work otherwise complies with+ the conditions stated in this License.++5. Submission of Contributions. Unless You explicitly state otherwise,+ any Contribution intentionally submitted for inclusion in the Work+ by You to the Licensor shall be under the terms and conditions of+ this License, without any additional terms or conditions.+ Notwithstanding the above, nothing herein shall supersede or modify+ the terms of any separate license agreement you may have executed+ with Licensor regarding such Contributions.++6. Trademarks. This License does not grant permission to use the trade+ names, trademarks, service marks, or product names of the Licensor,+ except as required for reasonable and customary use in describing the+ origin of the Work and reproducing the content of the NOTICE file.++7. Disclaimer of Warranty. Unless required by applicable law or+ agreed to in writing, Licensor provides the Work (and each+ Contributor provides its Contributions) on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or+ implied, including, without limitation, any warranties or conditions+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A+ PARTICULAR PURPOSE. You are solely responsible for determining the+ appropriateness of using or redistributing the Work and assume any+ risks associated with Your exercise of permissions under this License.++8. Limitation of Liability. In no event and under no legal theory,+ whether in tort (including negligence), contract, or otherwise,+ unless required by applicable law (such as deliberate and grossly+ negligent acts) or agreed to in writing, shall any Contributor be+ liable to You for damages, including any direct, indirect, special,+ incidental, or consequential damages of any character arising as a+ result of this License or out of the use or inability to use the+ Work (including but not limited to damages for loss of goodwill,+ work stoppage, computer failure or malfunction, or any and all+ other commercial damages or losses), even if such Contributor+ has been advised of the possibility of such damages.++9. Accepting Warranty or Additional Liability. While redistributing+ the Work or Derivative Works thereof, You may choose to offer,+ and charge a fee for, acceptance of support, warranty, indemnity,+ or other liability obligations and/or rights consistent with this+ License. However, in accepting such obligations, You may act only+ on Your own behalf and on Your sole responsibility, not on behalf+ of any other Contributor, and only if You agree to indemnify,+ defend, and hold each Contributor harmless for any liability+ incurred by, or claims asserted against, such Contributor by reason+ of your accepting any such warranty or additional liability.++END OF TERMS AND CONDITIONS</pre></li><li class="license"><h3 id="Apache-2.0">Apache License 2.0</h3><h4>Used by:</h4><ul class="license-used-by">- <li><a href=" https://github.com/sgodwincs/dlv-list-rs ">dlv-list 0.5.2</a></li>+ <li><a href=" https://github.com/dtolnay/anyhow ">anyhow 1.0.86</a></li>+ <li><a href=" https://github.com/dtolnay/async-trait ">async-trait 0.1.80</a></li>+ <li><a href=" https://github.com/dtolnay/dtoa ">dtoa 1.0.9</a></li>+ <li><a href=" https://github.com/dtolnay/itoa ">itoa 1.0.11</a></li>+ <li><a href=" https://github.com/rust-lang/libc ">libc 0.2.155</a></li>+ <li><a href=" https://github.com/dtolnay/miniserde ">miniserde 0.1.39</a></li>+ <li><a href=" https://github.com/dtolnay/monostate ">monostate-impl 0.1.13</a></li>+ <li><a href=" https://github.com/dtolnay/monostate ">monostate 0.1.13</a></li>+ <li><a href=" https://github.com/illicitonion/num_enum ">num_enum 0.6.1</a></li>+ <li><a href=" https://github.com/illicitonion/num_enum ">num_enum 0.7.2</a></li>+ <li><a href=" https://github.com/illicitonion/num_enum ">num_enum_derive 0.6.1</a></li>+ <li><a href=" https://github.com/illicitonion/num_enum ">num_enum_derive 0.7.2</a></li>+ <li><a href=" https://github.com/dtolnay/paste ">paste 1.0.15</a></li>+ <li><a href=" https://github.com/dtolnay/proc-macro2 ">proc-macro2 1.0.86</a></li>+ <li><a href=" https://github.com/dtolnay/quote ">quote 1.0.36</a></li>+ <li><a href=" https://github.com/dtolnay/rustversion ">rustversion 1.0.17</a></li>+ <li><a href=" https://github.com/dtolnay/ryu ">ryu 1.0.18</a></li>+ <li><a href=" https://github.com/dtolnay/semver ">semver 1.0.23</a></li>+ <li><a href=" https://github.com/dtolnay/seq-macro ">seq-macro 0.3.5</a></li>+ <li><a href=" https://github.com/serde-rs/serde ">serde 1.0.203</a></li>+ <li><a href=" https://github.com/serde-rs/serde ">serde_derive 1.0.203</a></li>+ <li><a href=" https://github.com/serde-rs/json ">serde_json 1.0.118</a></li>+ <li><a href=" https://github.com/dtolnay/path-to-error ">serde_path_to_error 0.1.16</a></li>+ <li><a href=" https://github.com/nox/serde_urlencoded ">serde_urlencoded 0.7.1</a></li>+ <li><a href=" https://github.com/dtolnay/syn ">syn 2.0.68</a></li>+ <li><a href=" https://github.com/dtolnay/thiserror ">thiserror-impl 1.0.61</a></li>+ <li><a href=" https://github.com/dtolnay/thiserror ">thiserror 1.0.61</a></li>+ <li><a href=" https://github.com/dtolnay/unicode-ident ">unicode-ident 1.0.12</a></li>+ <li><a href=" https://github.com/SimonSapin/rust-utf8 ">utf-8 0.7.6</a></li>+ <li><a href=" https://github.com/alacritty/vte ">utf8parse 0.2.2</a></li>+ <li><a href=" https://github.com/MattiasBuelens/wasm-streams/ ">wasm-streams 0.4.0</a></li></ul><pre class="license-text"> Apache LicenseVersion 2.0, January 2004@@ -5336,42 +5765,22 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTIONincurred by, or claims asserted against, such Contributor by reasonof your accepting any such warranty or additional liability.-END OF TERMS AND CONDITIONS</pre>+END OF TERMS AND CONDITIONS+</pre></li><li class="license"><h3 id="Apache-2.0">Apache License 2.0</h3><h4>Used by:</h4><ul class="license-used-by">- <li><a href=" https://github.com/dtolnay/anyhow ">anyhow 1.0.86</a></li>- <li><a href=" https://github.com/dtolnay/async-trait ">async-trait 0.1.80</a></li>- <li><a href=" https://github.com/dtolnay/dtoa ">dtoa 1.0.9</a></li>- <li><a href=" https://github.com/dtolnay/itoa ">itoa 1.0.11</a></li>- <li><a href=" https://github.com/rust-lang/libc ">libc 0.2.155</a></li>- <li><a href=" https://github.com/dtolnay/monostate ">monostate-impl 0.1.13</a></li>- <li><a href=" https://github.com/dtolnay/monostate ">monostate 0.1.13</a></li>- <li><a href=" https://github.com/illicitonion/num_enum ">num_enum 0.6.1</a></li>- <li><a href=" https://github.com/illicitonion/num_enum ">num_enum 0.7.2</a></li>- <li><a href=" https://github.com/illicitonion/num_enum ">num_enum_derive 0.6.1</a></li>- <li><a href=" https://github.com/illicitonion/num_enum ">num_enum_derive 0.7.2</a></li>- <li><a href=" https://github.com/dtolnay/paste ">paste 1.0.15</a></li>- <li><a href=" https://github.com/dtolnay/proc-macro2 ">proc-macro2 1.0.86</a></li>- <li><a href=" https://github.com/dtolnay/quote ">quote 1.0.36</a></li>- <li><a href=" https://github.com/dtolnay/rustversion ">rustversion 1.0.17</a></li>- <li><a href=" https://github.com/dtolnay/ryu ">ryu 1.0.18</a></li>- <li><a href=" https://github.com/dtolnay/semver ">semver 1.0.23</a></li>- <li><a href=" https://github.com/dtolnay/seq-macro ">seq-macro 0.3.5</a></li>- <li><a href=" https://github.com/serde-rs/serde ">serde 1.0.203</a></li>- <li><a href=" https://github.com/serde-rs/serde ">serde_derive 1.0.203</a></li>- <li><a href=" https://github.com/serde-rs/json ">serde_json 1.0.118</a></li>- <li><a href=" https://github.com/dtolnay/path-to-error ">serde_path_to_error 0.1.16</a></li>- <li><a href=" https://github.com/nox/serde_urlencoded ">serde_urlencoded 0.7.1</a></li>- <li><a href=" https://github.com/dtolnay/syn ">syn 2.0.68</a></li>- <li><a href=" https://github.com/dtolnay/thiserror ">thiserror-impl 1.0.61</a></li>- <li><a href=" https://github.com/dtolnay/thiserror ">thiserror 1.0.61</a></li>- <li><a href=" https://github.com/dtolnay/unicode-ident ">unicode-ident 1.0.12</a></li>- <li><a href=" https://github.com/SimonSapin/rust-utf8 ">utf-8 0.7.6</a></li>- <li><a href=" https://github.com/alacritty/vte ">utf8parse 0.2.2</a></li>- <li><a href=" https://github.com/MattiasBuelens/wasm-streams/ ">wasm-streams 0.4.0</a></li>+ <li><a href=" https://github.com/rust-lang/futures-rs ">futures-channel 0.3.30</a></li>+ <li><a href=" https://github.com/rust-lang/futures-rs ">futures-core 0.3.30</a></li>+ <li><a href=" https://github.com/rust-lang/futures-rs ">futures-executor 0.3.30</a></li>+ <li><a href=" https://github.com/rust-lang/futures-rs ">futures-io 0.3.30</a></li>+ <li><a href=" https://github.com/rust-lang/futures-rs ">futures-macro 0.3.30</a></li>+ <li><a href=" https://github.com/rust-lang/futures-rs ">futures-sink 0.3.30</a></li>+ <li><a href=" https://github.com/rust-lang/futures-rs ">futures-task 0.3.30</a></li>+ <li><a href=" https://github.com/rust-lang/futures-rs ">futures-util 0.3.30</a></li>+ <li><a href=" https://github.com/rust-lang/futures-rs ">futures 0.3.30</a></li></ul><pre class="license-text"> Apache LicenseVersion 2.0, January 2004@@ -5549,21 +5958,39 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTIONof your accepting any such warranty or additional liability.END OF TERMS AND CONDITIONS++APPENDIX: How to apply the Apache License to your work.++ To apply the Apache License to your work, attach the following+ boilerplate notice, with the fields enclosed by brackets "[]"+ replaced with your own identifying information. (Don't include+ the brackets!) The text should be enclosed in the appropriate+ comment syntax for the file format. We also recommend that a+ file or class name and description of purpose be included on the+ same "printed page" as the copyright notice for easier+ identification within third-party archives.++Copyright (c) 2016 Alex Crichton+Copyright (c) 2017 The Tokio Authors++Licensed under the Apache License, Version 2.0 (the "License");+you may not use this file except in compliance with the License.+You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++Unless required by applicable law or agreed to in writing, software+distributed under the License is distributed on an "AS IS" BASIS,+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+See the License for the specific language governing permissions and+limitations under the License.</pre></li><li class="license"><h3 id="Apache-2.0">Apache License 2.0</h3><h4>Used by:</h4><ul class="license-used-by">- <li><a href=" https://github.com/rust-lang/futures-rs ">futures-channel 0.3.30</a></li>- <li><a href=" https://github.com/rust-lang/futures-rs ">futures-core 0.3.30</a></li>- <li><a href=" https://github.com/rust-lang/futures-rs ">futures-executor 0.3.30</a></li>- <li><a href=" https://github.com/rust-lang/futures-rs ">futures-io 0.3.30</a></li>- <li><a href=" https://github.com/rust-lang/futures-rs ">futures-macro 0.3.30</a></li>- <li><a href=" https://github.com/rust-lang/futures-rs ">futures-sink 0.3.30</a></li>- <li><a href=" https://github.com/rust-lang/futures-rs ">futures-task 0.3.30</a></li>- <li><a href=" https://github.com/rust-lang/futures-rs ">futures-util 0.3.30</a></li>- <li><a href=" https://github.com/rust-lang/futures-rs ">futures 0.3.30</a></li>+ <li><a href=" https://github.com/paholg/typenum ">typenum 1.17.0</a></li></ul><pre class="license-text"> Apache LicenseVersion 2.0, January 2004@@ -5753,8 +6180,7 @@ APPENDIX: How to apply the Apache License to your work.same "printed page" as the copyright notice for easieridentification within third-party archives.-Copyright (c) 2016 Alex Crichton-Copyright (c) 2017 The Tokio Authors+Copyright 2014 Paho Lurie-GreggLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.@@ -5766,14 +6192,14 @@ Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions and-limitations under the License.-</pre>+limitations under the License.</pre></li><li class="license"><h3 id="Apache-2.0">Apache License 2.0</h3><h4>Used by:</h4><ul class="license-used-by">- <li><a href=" https://github.com/paholg/typenum ">typenum 1.17.0</a></li>+ <li><a href=" https://github.com/seanmonstar/reqwest ">reqwest 0.11.27</a></li>+ <li><a href=" https://github.com/seanmonstar/reqwest ">reqwest 0.12.5</a></li></ul><pre class="license-text"> Apache LicenseVersion 2.0, January 2004@@ -5963,7 +6389,7 @@ APPENDIX: How to apply the Apache License to your work.same "printed page" as the copyright notice for easieridentification within third-party archives.-Copyright 2014 Paho Lurie-Gregg+Copyright 2016 Sean McArthurLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.@@ -5975,14 +6401,14 @@ Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions and-limitations under the License.</pre>+limitations under the License.+</pre></li><li class="license"><h3 id="Apache-2.0">Apache License 2.0</h3><h4>Used by:</h4><ul class="license-used-by">- <li><a href=" https://github.com/seanmonstar/reqwest ">reqwest 0.11.27</a></li>- <li><a href=" https://github.com/seanmonstar/reqwest ">reqwest 0.12.5</a></li>+ <li><a href=" https://github.com/SergioBenitez/yansi ">yansi 1.0.1</a></li></ul><pre class="license-text"> Apache LicenseVersion 2.0, January 2004@@ -6172,7 +6598,7 @@ APPENDIX: How to apply the Apache License to your work.same "printed page" as the copyright notice for easieridentification within third-party archives.-Copyright 2016 Sean McArthur+Copyright 2017 Sergio BenitezLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.@@ -8359,6 +8785,7 @@ limitations under the License.</pre><li><a href=" https://github.com/rust-itertools/itertools ">itertools 0.10.5</a></li><li><a href=" https://github.com/rust-itertools/itertools ">itertools 0.11.0</a></li><li><a href=" https://github.com/rust-itertools/itertools ">itertools 0.12.1</a></li>+ <li><a href=" https://github.com/rust-itertools/itertools ">itertools 0.13.0</a></li><li><a href=" https://github.com/bluss/rust-itertools ">itertools 0.8.2</a></li><li><a href=" https://github.com/bluss/rust-itertools ">itertools 0.9.0</a></li><li><a href=" https://github.com/image-rs/jpeg-decoder ">jpeg-decoder 0.3.1</a></li>@@ -8455,6 +8882,7 @@ limitations under the License.</pre><li><a href=" https://github.com/rustwasm/wasm-bindgen ">wasm-bindgen 0.2.92</a></li><li><a href=" https://github.com/rustwasm/wasm-bindgen/tree/master/crates/web-sys ">web-sys 0.3.69</a></li><li><a href=" https://github.com/Stebalien/xattr ">xattr 1.3.1</a></li>+ <li><a href=" https://github.com/SergioBenitez/yansi ">yansi 0.5.1</a></li></ul><pre class="license-text"> Apache LicenseVersion 2.0, January 2004@@ -9699,6 +10127,8 @@ APPENDIX: How to apply the Apache License to your work.<li><a href=" https://github.com/rust-random/rand ">rand_chacha 0.3.1</a></li><li><a href=" https://github.com/rust-random/rand ">rand_pcg 0.3.1</a></li><li><a href=" https://github.com/rust-random/rngs ">rand_xorshift 0.3.0</a></li>+ <li><a href=" https://github.com/d-e-s-o/test-log.git ">test-log-macros 0.2.16</a></li>+ <li><a href=" https://github.com/d-e-s-o/test-log.git ">test-log 0.2.16</a></li></ul><pre class="license-text"> Apache LicenseVersion 2.0, January 2004@@ -11364,10 +11794,13 @@ limitations under the License.<li><a href=" https://github.com/maciejhirsz/logos ">logos 0.13.0</a></li><li><a href=" https://github.com/reem/rust-mac.git ">mac 0.1.1</a></li><li><a href=" https://github.com/stainless-steel/md5 ">md5 0.7.0</a></li>+ <li><a href=" https://github.com/dtolnay/miniserde ">mini-internal 0.1.39</a></li><li><a href=" https://github.com/faern/oneshot ">oneshot 0.1.8</a></li><li><a href=" https://github.com/datafuselabs/openraft ">openraft-macros 0.9.5</a></li><li><a href=" https://github.com/datafuselabs/openraft ">openraft 0.9.5</a></li><li><a href=" https://github.com/sfackler/rust-openssl ">openssl 0.10.64</a></li>+ <li><a href=" https://github.com/jimblandy/perf-event-open-sys.git ">perf-event-open-sys 4.0.0</a></li>+ <li><a href=" https://github.com/jimblandy/perf-event.git ">perf-event 0.4.8</a></li><li><a href=" https://github.com/jamesmunns/postcard ">postcard-derive 0.1.1</a></li><li><a href=" https://github.com/aclysma/profiling ">profiling-procmacros 1.0.15</a></li><li><a href=" https://github.com/aclysma/profiling ">profiling 1.0.15</a></li>@@ -13300,21 +13733,6 @@ Permission is hereby granted, free of charge, to any person obtaining a copy ofThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.-</pre>- </li>- <li class="license">- <h3 id="MIT">MIT License</h3>- <h4>Used by:</h4>- <ul class="license-used-by">- <li><a href=" https://github.com/quickwit-oss/tantivy ">tantivy 0.22.0-dev</a></li>- </ul>- <pre class="license-text">Copyright (c) 2018 by the project authors, as listed in the AUTHORS file.--Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:--The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</pre></li>@@ -13770,6 +14188,39 @@ The above copyright notice and this permission noticeshall be included in all copies or substantial portionsof the Software.+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED+TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT+SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER+DEALINGS IN THE SOFTWARE.+</pre>+ </li>+ <li class="license">+ <h3 id="MIT">MIT License</h3>+ <h4>Used by:</h4>+ <ul class="license-used-by">+ <li><a href=" https://github.com/pseitz/binggan ">binggan 0.8.1</a></li>+ </ul>+ <pre class="license-text">Copyright (c) 2024 Pascal Seitz++Permission is hereby granted, free of charge, to any+person obtaining a copy of this software and associated+documentation files (the "Software"), to deal in the+Software without restriction, including without+limitation the rights to use, copy, modify, merge,+publish, distribute, sublicense, and/or sell copies of+the Software, and to permit persons to whom the Software+is furnished to do so, subject to the following+conditions:++The above copyright notice and this permission notice+shall be included in all copies or substantial portions+of the Software.+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OFANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITEDTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A@@ -14574,6 +15025,35 @@ furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.+</pre>+ </li>+ <li class="license">+ <h3 id="MIT">MIT License</h3>+ <h4>Used by:</h4>+ <ul class="license-used-by">+ <li><a href=" https://github.com/playXE/alloca-rs ">alloca 0.4.0</a></li>+ </ul>+ <pre class="license-text">MIT License++Copyright (c) 2021 Adel Prokurov++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE@@ -14741,14 +15221,34 @@ SOFTWARE.<h3 id="MIT">MIT License</h3><h4>Used by:</h4><ul class="license-used-by">- <li><a href=" https://github.com/quickwit-oss/tantivy ">ownedbytes 0.6.0</a></li>- <li><a href=" https://github.com/quickwit-oss/tantivy ">tantivy-bitpacker 0.5.0</a></li>- <li><a href=" https://github.com/quickwit-oss/tantivy ">tantivy-columnar 0.2.0</a></li>- <li><a href=" https://github.com/quickwit-oss/tantivy ">tantivy-common 0.6.0</a></li>- <li><a href=" https://github.com/quickwit-oss/tantivy ">tantivy-query-grammar 0.21.0</a></li>- <li><a href=" https://github.com/quickwit-oss/tantivy ">tantivy-sstable 0.2.0</a></li>- <li><a href=" https://github.com/quickwit-oss/tantivy ">tantivy-stacker 0.2.0</a></li>- <li><a href=" https://github.com/quickwit-oss/tantivy ">tantivy-tokenizer-api 0.2.0</a></li>+ <li><a href=" https://chiselapp.com/user/fifr/repository/rustop ">rustop 1.1.4</a></li>+ </ul>+ <pre class="license-text">MIT License++Copyright (c) 2024 Frank Fischer++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.</pre>+ </li>+ <li class="license">+ <h3 id="MIT">MIT License</h3>+ <h4>Used by:</h4>+ <ul class="license-used-by"><li><a href=" https://crates.io/crates/optics ">optics 0.1.0</a></li><li><a href=" https://crates.io/crates/zimba ">zimba 0.1.0</a></li><li><a href=" https://github.com/tokio-rs/async-stream ">async-stream-impl 0.3.5</a></li>@@ -15544,6 +16044,34 @@ subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.+</pre>+ </li>+ <li class="license">+ <h3 id="MIT">MIT License</h3>+ <h4>Used by:</h4>+ <ul class="license-used-by">+ <li><a href=" https://github.com/PSeitz/peakmem-alloc ">peakmem-alloc 0.3.0</a></li>+ </ul>+ <pre class="license-text">The MIT License (MIT)++Copyright (c) 2023 Pascal Seitz++Permission is hereby granted, free of charge, to any person obtaining a copy of+this software and associated documentation files (the "Software"), to deal in+the Software without restriction, including without limitation the rights to+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of+the Software, and to permit persons to whom the Software is furnished to do so,+subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESSFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS ORdiff --git a/crates/tantivy/Cargo.toml b/crates/tantivy/Cargo.tomlindex 3b128a8f..8e468555 100644--- a/crates/tantivy/Cargo.toml+++ b/crates/tantivy/Cargo.toml@@ -5,13 +5,11 @@ description = """Search engine library"""documentation = "https://docs.rs/tantivy/"edition = "2021"exclude = ["benches/*.json", "benches/*.txt"]-homepage = "https://github.com/quickwit-oss/tantivy"keywords = ["search", "information", "retrieval"]license = "MIT"name = "tantivy"+publish = falsereadme = "README.md"-repository = "https://github.com/quickwit-oss/tantivy"-rust-version = "1.63"version = "0.23.0"[dependencies]@@ -100,7 +98,6 @@ stopwords = []lz4-compression = ["lz4_flex"]failpoints = ["fail", "fail/failpoints"]-unstable = [] # useful for benches.quickwit = ["futures-util"]diff --git a/crates/tantivy/src/bitpacker/mod.rs b/crates/tantivy/src/bitpacker/mod.rsindex 17ae3f1a..ef91ade0 100644--- a/crates/tantivy/src/bitpacker/mod.rs+++ b/crates/tantivy/src/bitpacker/mod.rs@@ -5,7 +5,6 @@ mod filter_vec;use std::cmp::Ordering;pub use bitpacker::{BitPacker, BitUnpacker};-pub use blocked_bitpacker::BlockedBitpacker;/// Computes the number of bits that will be used for bitpacking.///diff --git a/crates/tantivy/src/columnar/column_values/u64_based/line.rs b/crates/tantivy/src/columnar/column_values/u64_based/line.rsindex 8f56ef35..99de1c66 100644--- a/crates/tantivy/src/columnar/column_values/u64_based/line.rs+++ b/crates/tantivy/src/columnar/column_values/u64_based/line.rs@@ -126,8 +126,8 @@ impl Line {/// f: i in 0..[ys.num_vals()) -> ys[i].////// - The approximation is always lower than the actual value.- /// Or more rigorously, formally `f(i).wrapping_sub(ys[i])` is small- /// for any i in [0..ys.len()).+ /// Or more rigorously, formally `f(i).wrapping_sub(ys[i])` is small+ /// for any i in [0..ys.len())./// - It computes without panicking for any value of it.////// This function is only invariable by translation if all of thediff --git a/crates/tantivy/src/columnar/columnar/merge/mod.rs b/crates/tantivy/src/columnar/columnar/merge/mod.rsindex 7856e3ab..6acc8f14 100644--- a/crates/tantivy/src/columnar/columnar/merge/mod.rs+++ b/crates/tantivy/src/columnar/columnar/merge/mod.rs@@ -68,9 +68,9 @@ impl From<ColumnType> for ColumnTypeCategory {/// happen:/// - If the required column type is compatible with all of the input columnar, the resulsting/// merged-/// columnar will simply coerce the input column and use the required column type.+/// columnar will simply coerce the input column and use the required column type./// - If the required column type is incompatible with one of the input columnar, the merged-/// will fail with an InvalidData error.+/// will fail with an InvalidData error.////// `merge_row_order` makes it possible to remove or reorder row in the resulting/// `Columnar` table.diff --git a/crates/tantivy/src/columnar/columnar/merge/term_merger.rs b/crates/tantivy/src/columnar/columnar/merge/term_merger.rsindex 7688d847..a3a20249 100644--- a/crates/tantivy/src/columnar/columnar/merge/term_merger.rs+++ b/crates/tantivy/src/columnar/columnar/merge/term_merger.rs@@ -36,7 +36,7 @@ impl<'a> Ord for HeapItem<'a> {/// The item yield is actually a pair with/// - the term/// - a slice with the ordinal of the segments containing-/// the terms.+/// the terms.pub struct TermMerger<'a> {heap: BinaryHeap<HeapItem<'a>>,current_streamers: Vec<HeapItem<'a>>,diff --git a/crates/tantivy/src/columnar/compat_tests.rs b/crates/tantivy/src/columnar/compat_tests.rsdeleted file mode 100644index 9e8980ab..00000000--- a/crates/tantivy/src/columnar/compat_tests.rs+++ /dev/null@@ -1,44 +0,0 @@-use std::path::PathBuf;--use super::{Column, ColumnarReader, DynamicColumn, CURRENT_VERSION};--const NUM_DOCS: u32 = u16::MAX as u32;--fn generate_columnar(num_docs: u32) -> Vec<u8> {- use super::ColumnarWriter;-- let mut columnar_writer = ColumnarWriter::default();-- for i in 0..num_docs {- if i % 100 == 0 {- columnar_writer.record_numerical(i, "sparse", i as u64);- }- if i % 2 == 0 {- columnar_writer.record_numerical(i, "dense", i as u64);- }- columnar_writer.record_numerical(i, "full", i as u64);- columnar_writer.record_numerical(i, "multi", i as u64);- columnar_writer.record_numerical(i, "multi", i as u64);- }-- let mut wrt: Vec<u8> = Vec::new();- columnar_writer.serialize(num_docs, None, &mut wrt).unwrap();-- wrt-}--fn path_for_version(version: &str) -> String {- format!("./compat_tests_data/{}.columnar", version)-}--fn open_column(reader: &ColumnarReader, name: &str) -> Column<u64> {- let column = reader.read_columns(name).unwrap()[0]- .open()- .unwrap()- .coerce_numerical(super::NumericalType::U64)- .unwrap();- let DynamicColumn::U64(column) = column else {- panic!();- };- column-}diff --git a/crates/tantivy/src/columnar/mod.rs b/crates/tantivy/src/columnar/mod.rsindex f0580bf7..b8101b35 100644--- a/crates/tantivy/src/columnar/mod.rs+++ b/crates/tantivy/src/columnar/mod.rs@@ -122,6 +122,3 @@ impl Cardinality {#[cfg(test)]mod tests;--#[cfg(test)]-mod compat_tests;diff --git a/crates/tantivy/src/columnar/tests.rs b/crates/tantivy/src/columnar/tests.rsindex 99c465bb..5fb96a3e 100644--- a/crates/tantivy/src/columnar/tests.rs+++ b/crates/tantivy/src/columnar/tests.rs@@ -344,7 +344,7 @@ fn column_value_strategy() -> impl Strategy<Value = ColumnValue> {ip_addr_byte))),1 => any::<bool>().prop_map(ColumnValue::Bool),- 1 => (0_679_723_993i64..1_679_723_995i64)+ 1 => (679_723_993i64..1_679_723_995i64).prop_map(|val| { ColumnValue::DateTime(DateTime::from_timestamp_secs(val)) })]}diff --git a/crates/tantivy/src/directory/directory.rs b/crates/tantivy/src/directory/directory.rsindex 19df314d..e9d528d1 100644--- a/crates/tantivy/src/directory/directory.rs+++ b/crates/tantivy/src/directory/directory.rs@@ -103,9 +103,9 @@ fn retry_policy(is_blocking: bool) -> RetryPolicy {/// There are currently two implementations of `Directory`////// - The [`MMapDirectory`][crate::directory::MmapDirectory], this-/// should be your default choice.+/// should be your default choice./// - The [`RamDirectory`][crate::directory::RamDirectory], which-/// should be used mostly for tests.+/// should be used mostly for tests.pub trait Directory: DirectoryClone + fmt::Debug + Send + Sync + 'static {/// Opens a file and returns a boxed `FileHandle`.///@@ -234,7 +234,8 @@ pub trait DirectoryClone {}impl<T> DirectoryClone for T-where T: 'static + Directory + Clone+where+ T: 'static + Directory + Clone,{fn box_clone(&self) -> Box<dyn Directory> {Box::new(self.clone())diff --git a/crates/tantivy/src/fastfield/alive_bitset.rs b/crates/tantivy/src/fastfield/alive_bitset.rsindex 76c31dfd..76202b95 100644--- a/crates/tantivy/src/fastfield/alive_bitset.rs+++ b/crates/tantivy/src/fastfield/alive_bitset.rs@@ -157,25 +157,3 @@ mod tests {assert_eq!(data, (2..=999).collect::<Vec<_>>());}}--#[cfg(all(test, feature = "unstable"))]-mod bench {-- use rand::prelude::IteratorRandom;- use rand::thread_rng;-- use super::AliveBitSet;-- fn get_alive() -> Vec<u32> {- let mut data = (0..1_000_000_u32).collect::<Vec<u32>>();- for _ in 0..1_000_000 / 8 {- remove_rand(&mut data);- }- data- }-- fn remove_rand(raw: &mut Vec<u32>) {- let i = (0..raw.len()).choose(&mut thread_rng()).unwrap();- raw.remove(i);- }-}diff --git a/crates/tantivy/src/fastfield/facet_reader.rs b/crates/tantivy/src/fastfield/facet_reader.rsindex ac27df56..0fde3717 100644--- a/crates/tantivy/src/fastfield/facet_reader.rs+++ b/crates/tantivy/src/fastfield/facet_reader.rs@@ -26,9 +26,9 @@ impl FacetReader {////// A facet reader just wraps :/// - a `MultiValuedFastFieldReader` that makes it possible to- /// access the list of facet ords for a given document.+ /// access the list of facet ords for a given document./// - a `TermDictionary` that helps associating a facet to- /// an ordinal and vice versa.+ /// an ordinal and vice versa.pub fn new(facet_column: StrColumn) -> FacetReader {FacetReader { facet_column }}diff --git a/crates/tantivy/src/index/index.rs b/crates/tantivy/src/index/index.rsindex aab05540..af2593e2 100644--- a/crates/tantivy/src/index/index.rs+++ b/crates/tantivy/src/index/index.rs@@ -50,9 +50,9 @@ fn load_metas(/// This operation is atomic :/// Either/// - it fails, in which case an error is returned,-/// and the `meta.json` remains untouched,+/// and the `meta.json` remains untouched,/// - it succeeds, and `meta.json` is written-/// and flushed.+/// and flushed.////// This method is not part of tantivy's public APIfn save_new_metas(@@ -554,11 +554,11 @@ impl Index {/// it is safe to manually delete the lockfile.////// - `num_threads` defines the number of indexing workers that- /// should work at the same time.+ /// should work at the same time.////// - `overall_memory_budget_in_bytes` sets the amount of memory- /// allocated for all indexing thread.- /// Each thread will receive a budget of `overall_memory_budget_in_bytes / num_threads`.+ /// allocated for all indexing thread.+ /// Each thread will receive a budget of `overall_memory_budget_in_bytes / num_threads`.////// # Errors/// If the lockfile already exists, returns `Error::DirectoryLockBusy` or an `Error::IoError`.diff --git a/crates/tantivy/src/index/index_meta.rs b/crates/tantivy/src/index/index_meta.rsindex d0b64958..144335e9 100644--- a/crates/tantivy/src/index/index_meta.rs+++ b/crates/tantivy/src/index/index_meta.rs@@ -411,8 +411,6 @@ mod tests {use crate::index::index_meta::UntrackedIndexMeta;use crate::schema::{Schema, TEXT};use crate::store::Compressor;- #[cfg(feature = "zstd-compression")]- use crate::store::ZstdCompressor;use crate::{IndexSettings, IndexSortByField, Order};#[test]@@ -447,79 +445,6 @@ mod tests {assert_eq!(index_metas.opstamp, deser_meta.opstamp);}- #[test]- #[cfg(feature = "zstd-compression")]- fn test_serialize_metas_zstd_compressor() {- let schema = {- let mut schema_builder = Schema::builder();- schema_builder.add_text_field("text", TEXT);- schema_builder.build()- };- let index_metas = IndexMeta {- index_settings: IndexSettings {- sort_by_field: Some(IndexSortByField {- field: "text".to_string(),- order: Order::Asc,- }),- docstore_compression: crate::store::Compressor::Zstd(ZstdCompressor {- compression_level: Some(4),- }),- docstore_blocksize: 1_000_000,- docstore_compress_dedicated_thread: true,- },- segments: Vec::new(),- schema,- opstamp: 0u64,- payload: None,- };- let json = serde_json::ser::to_string(&index_metas).expect("serialization failed");- assert_eq!(- json,- r#"{"index_settings":{"sort_by_field":{"field":"text","order":"Asc"},"docstore_compression":"zstd(compression_level=4)","docstore_blocksize":1000000},"segments":[],"schema":[{"name":"text","type":"text","options":{"indexing":{"record":"position","fieldnorms":true,"tokenizer":"default"},"stored":false,"fast":false}}],"opstamp":0}"#- );-- let deser_meta: UntrackedIndexMeta = serde_json::from_str(&json).unwrap();- assert_eq!(index_metas.index_settings, deser_meta.index_settings);- assert_eq!(index_metas.schema, deser_meta.schema);- assert_eq!(index_metas.opstamp, deser_meta.opstamp);- }-- #[test]- #[cfg(all(feature = "lz4-compression", feature = "zstd-compression"))]- fn test_serialize_metas_invalid_comp() {- let json = r#"{"index_settings":{"sort_by_field":{"field":"text","order":"Asc"},"docstore_compression":"zsstd","docstore_blocksize":1000000},"segments":[],"schema":[{"name":"text","type":"text","options":{"indexing":{"record":"position","fieldnorms":true,"tokenizer":"default"},"stored":false,"fast":false}}],"opstamp":0}"#;-- let err = serde_json::from_str::<UntrackedIndexMeta>(json).unwrap_err();- assert_eq!(- err.to_string(),- "unknown variant `zsstd`, expected one of `none`, `lz4`, `zstd`, \- `zstd(compression_level=5)` at line 1 column 96"- .to_string()- );-- let json = r#"{"index_settings":{"sort_by_field":{"field":"text","order":"Asc"},"docstore_compression":"zstd(bla=10)","docstore_blocksize":1000000},"segments":[],"schema":[{"name":"text","type":"text","options":{"indexing":{"record":"position","fieldnorms":true,"tokenizer":"default"},"stored":false,"fast":false}}],"opstamp":0}"#;-- let err = serde_json::from_str::<UntrackedIndexMeta>(json).unwrap_err();- assert_eq!(- err.to_string(),- "unknown zstd option \"bla\" at line 1 column 103".to_string()- );- }-- #[test]- #[cfg(not(feature = "zstd-compression"))]- fn test_serialize_metas_unsupported_comp() {- let json = r#"{"index_settings":{"sort_by_field":{"field":"text","order":"Asc"},"docstore_compression":"zstd","docstore_blocksize":1000000},"segments":[],"schema":[{"name":"text","type":"text","options":{"indexing":{"record":"position","fieldnorms":true,"tokenizer":"default"},"stored":false,"fast":false}}],"opstamp":0}"#;-- let err = serde_json::from_str::<UntrackedIndexMeta>(json).unwrap_err();- assert_eq!(- err.to_string(),- "unsupported variant `zstd`, please enable Tantivy's `zstd-compression` feature at \- line 1 column 95"- .to_string()- );- }-#[test]#[cfg(feature = "lz4-compression")]fn test_index_settings_default() {diff --git a/crates/tantivy/src/index/segment_reader.rs b/crates/tantivy/src/index/segment_reader.rsindex 15ce229e..c927a7d0 100644--- a/crates/tantivy/src/index/segment_reader.rs+++ b/crates/tantivy/src/index/segment_reader.rs@@ -478,7 +478,7 @@ pub fn merge_field_meta_data(.into_iter().kmerge_by(|left, right| left < right)// TODO: Remove allocation- .group_by(|el| (el.field_name.to_string(), el.typ))+ .chunk_by(|el| (el.field_name.to_string(), el.typ)){let mut merged: FieldMetadata = group.next().unwrap();for el in group {diff --git a/crates/tantivy/src/indexer/delete_queue.rs b/crates/tantivy/src/indexer/delete_queue.rsindex 4f8a8a38..75871637 100644--- a/crates/tantivy/src/indexer/delete_queue.rs+++ b/crates/tantivy/src/indexer/delete_queue.rs@@ -180,7 +180,7 @@ impl DeleteCursor {/// - either all of the delete operation currently in the queue are consume and the next get/// will return `None`./// - the next get will return the first operation with an- /// `opstamp >= target_opstamp`.+ /// `opstamp >= target_opstamp`.pub fn skip_to(&mut self, target_opstamp: Opstamp) {// TODO Can be optimize as we work with block.while self.is_behind_opstamp(target_opstamp) {diff --git a/crates/tantivy/src/indexer/index_writer.rs b/crates/tantivy/src/indexer/index_writer.rsindex 81ca8468..5b96227b 100644--- a/crates/tantivy/src/indexer/index_writer.rs+++ b/crates/tantivy/src/indexer/index_writer.rs@@ -1683,11 +1683,11 @@ mod tests {deleted_ids.remove(id);}IndexingOp::DeleteDoc { id } => {- existing_ids.remove(&id);+ existing_ids.remove(id);deleted_ids.insert(*id);}IndexingOp::DeleteDocQuery { id } => {- existing_ids.remove(&id);+ existing_ids.remove(id);deleted_ids.insert(*id);}_ => {}@@ -2356,7 +2356,7 @@ mod tests {#[test]fn test_fast_field_range() {- let ops: Vec<_> = (0..1000).map(|id| IndexingOp::add(id)).collect();+ let ops: Vec<_> = (0..1000).map(IndexingOp::add).collect();assert!(test_operation_strategy(&ops, false, true).is_ok());}diff --git a/crates/tantivy/src/indexer/log_merge_policy.rs b/crates/tantivy/src/indexer/log_merge_policy.rsindex 70488285..86a8fd34 100644--- a/crates/tantivy/src/indexer/log_merge_policy.rs+++ b/crates/tantivy/src/indexer/log_merge_policy.rs@@ -104,7 +104,7 @@ impl MergePolicy for LogMergePolicy {let mut current_max_log_size = f64::MAX;let mut levels = vec![];- for (_, merge_group) in &size_sorted_segments.into_iter().group_by(|segment| {+ for (_, merge_group) in &size_sorted_segments.into_iter().chunk_by(|segment| {let segment_log_size = f64::from(self.clip_min_size(segment.num_docs())).log2();if segment_log_size < (current_max_log_size - self.level_log_size) {// update current_max_log_size to create a new groupdiff --git a/crates/tantivy/src/indexer/merge_operation.rs b/crates/tantivy/src/indexer/merge_operation.rsindex a4ce49c9..ea92162f 100644--- a/crates/tantivy/src/indexer/merge_operation.rs+++ b/crates/tantivy/src/indexer/merge_operation.rs@@ -30,7 +30,7 @@ impl MergeOperationInventory {/// A `MergeOperation` has two roles./// It carries all of the information required to describe a merge:/// - `target_opstamp` is the opstamp up to which we want to consume the-/// delete queue and reflect their deletes.+/// delete queue and reflect their deletes./// - `segment_ids` is the list of segment to be merged.////// The second role is to ensure keep track of the fact that thesediff --git a/crates/tantivy/src/indexer/merger_sorted_index_test.rs b/crates/tantivy/src/indexer/merger_sorted_index_test.rsindex 009dbf8d..04c7d217 100644--- a/crates/tantivy/src/indexer/merger_sorted_index_test.rs+++ b/crates/tantivy/src/indexer/merger_sorted_index_test.rs@@ -482,40 +482,3 @@ mod tests {// }// }}--#[cfg(all(test, feature = "unstable"))]-mod bench_sorted_index_merge {-- use crate::index::Index;- use crate::indexer::merger::IndexMerger;- use crate::schema::{NumericOptions, Schema};- use crate::{IndexSettings, IndexSortByField, IndexWriter, Order};- fn create_index(sort_by_field: Option<IndexSortByField>) -> Index {- let mut schema_builder = Schema::builder();- let int_options = NumericOptions::default().set_fast().set_indexed();- let int_field = schema_builder.add_u64_field("intval", int_options);- let schema = schema_builder.build();-- let index_builder = Index::builder().schema(schema).settings(IndexSettings {- sort_by_field,- ..Default::default()- });- let index = index_builder.create_in_ram().unwrap();-- {- let mut index_writer: IndexWriter = index.writer_for_tests().unwrap();- let index_doc = |index_writer: &mut IndexWriter, val: u64| {- index_writer.add_document(doc!(int_field=>val)).unwrap();- };- // 3 segments with 10_000 values in the fast fields- for _ in 0..3 {- index_doc(&mut index_writer, 5000); // fix to make it unordered- for i in 0..10_000 {- index_doc(&mut index_writer, i);- }- index_writer.commit().unwrap();- }- }- index- }-}diff --git a/crates/tantivy/src/indexer/mod.rs b/crates/tantivy/src/indexer/mod.rsindex 9a062a74..64b121d4 100644--- a/crates/tantivy/src/indexer/mod.rs+++ b/crates/tantivy/src/indexer/mod.rs@@ -291,7 +291,7 @@ mod tests_mmap {Type::Str,),(format!("{field_name_out_internal}a"), Type::Str),- (format!("{field_name_out_internal}"), Type::Str),+ (field_name_out_internal.to_string(), Type::Str),(format!("num{field_name_out_internal}"), Type::I64),];expected_fields.sort();diff --git a/crates/tantivy/src/indexer/segment_entry.rs b/crates/tantivy/src/indexer/segment_entry.rsindex a5b40e76..9f8425bf 100644--- a/crates/tantivy/src/indexer/segment_entry.rs+++ b/crates/tantivy/src/indexer/segment_entry.rs@@ -11,11 +11,11 @@ use crate::indexer::delete_queue::DeleteCursor;/// In addition to segment `meta`,/// it contains a few transient states/// - `alive_bitset` is a bitset describing-/// documents that were alive during the commit-/// itself.+/// documents that were alive during the commit+/// itself./// - `delete_cursor` is the position in the delete queue.-/// Deletes happening before the cursor are reflected either-/// in the .del file or in the `alive_bitset`.+/// Deletes happening before the cursor are reflected either+/// in the .del file or in the `alive_bitset`.#[derive(Clone)]pub struct SegmentEntry {meta: SegmentMeta,diff --git a/crates/tantivy/src/indexer/segment_updater.rs b/crates/tantivy/src/indexer/segment_updater.rsindex 12faba95..5e7c3ba0 100644--- a/crates/tantivy/src/indexer/segment_updater.rs+++ b/crates/tantivy/src/indexer/segment_updater.rs@@ -31,9 +31,9 @@ const NUM_MERGE_THREADS: usize = 4;/// This operation is atomic:/// Either/// - it fails, in which case an error is returned,-/// and the `meta.json` remains untouched,+/// and the `meta.json` remains untouched,/// - it success, and `meta.json` is written-/// and flushed.+/// and flushed.////// This method is not part of tantivy's public APIpub(crate) fn save_metas(metas: &IndexMeta, directory: &dyn Directory) -> crate::Result<()> {diff --git a/crates/tantivy/src/indexer/segment_writer.rs b/crates/tantivy/src/indexer/segment_writer.rsindex ec6d69a4..d16dd613 100644--- a/crates/tantivy/src/indexer/segment_writer.rs+++ b/crates/tantivy/src/indexer/segment_writer.rs@@ -81,8 +81,8 @@ impl SegmentWriter {/// The arguments are defined as follows////// - memory_budget: most of the segment writer data (terms, and postings lists recorders)- /// is stored in a memory arena. This makes it possible for the user to define- /// the flushing behavior as a memory limit.+ /// is stored in a memory arena. This makes it possible for the user to define+ /// the flushing behavior as a memory limit./// - segment: The segment being written/// - schemapub fn for_segment(memory_budget_in_bytes: usize, segment: Segment) -> crate::Result<Self> {@@ -177,7 +177,7 @@ impl SegmentWriter {let vals_grouped_by_field = doc.iter_fields_and_values().sorted_by_key(|(field, _)| *field)- .group_by(|(field, _)| *field);+ .chunk_by(|(field, _)| *field);for (field, field_values) in &vals_grouped_by_field {let values = field_values.map(|el| el.1);@@ -500,7 +500,6 @@ mod tests {};#[test]- #[cfg(not(feature = "compare_hash_only"))]fn test_hashmap_size() {use super::compute_initial_table_size;assert_eq!(compute_initial_table_size(100_000).unwrap(), 1 << 12);diff --git a/crates/tantivy/src/postings/block_search.rs b/crates/tantivy/src/postings/block_search.rsindex 0fb21239..228f5b41 100644--- a/crates/tantivy/src/postings/block_search.rs+++ b/crates/tantivy/src/postings/block_search.rs@@ -10,7 +10,7 @@ use crate::postings::compression::COMPRESSION_BLOCK_SIZE;// .take_while(|&&val| val < target)// .count()/// ```-///+////// the `start` argument is just used to hint that the response is/// greater than beyond `start`. The implementation may or may not use/// it for optimization.@@ -18,7 +18,7 @@ use crate::postings::compression::COMPRESSION_BLOCK_SIZE;/// # Assumption////// - The block is sorted. Some elements may appear several times. This is the case at the-/// end of the last block for instance.+/// end of the last block for instance./// - The target is assumed smaller or equal to the last element of the block.pub fn branchless_binary_search(arr: &[u32; COMPRESSION_BLOCK_SIZE], target: u32) -> usize {let mut start = 0;diff --git a/crates/tantivy/src/query/boolean_query/boolean_query.rs b/crates/tantivy/src/query/boolean_query/boolean_query.rsindex 94ac5b0c..09951585 100644--- a/crates/tantivy/src/query/boolean_query/boolean_query.rs+++ b/crates/tantivy/src/query/boolean_query/boolean_query.rs@@ -8,11 +8,11 @@ use crate::schema::{IndexRecordOption, Term};/// The documents matched by the boolean query are/// those which/// * match all of the sub queries associated with the-/// `Must` occurrence+/// `Must` occurrence/// * match none of the sub queries associated with the-/// `MustNot` occurrence.+/// `MustNot` occurrence./// * match at least one of the sub queries associated-/// with the `Must` or `Should` occurrence.+/// with the `Must` or `Should` occurrence.///////// You can combine other query types and their `Occur`ances into one `BooleanQuery`diff --git a/crates/tantivy/src/query/phrase_query/phrase_scorer.rs b/crates/tantivy/src/query/phrase_query/phrase_scorer.rsindex 673c207c..89b39a47 100644--- a/crates/tantivy/src/query/phrase_query/phrase_scorer.rs+++ b/crates/tantivy/src/query/phrase_query/phrase_scorer.rs@@ -219,8 +219,8 @@ fn intersection_exists_with_slop(/// In contrast to the regular algorithm this solves some issues:/// - Keep track of the slop so far. Slop is a budget that is spent on the distance between terms./// - When encountering a match between two positions, which position is the best match is unclear-/// and depends on intersections afterwards, therefore this algorithm keeps left and right as-/// matches, but only counts one.+/// and depends on intersections afterwards, therefore this algorithm keeps left and right as+/// matches, but only counts one.////// This algorithm may return an incorrect count in some cases (e.g. left, right expansion and is/// then matches both on the following term.)diff --git a/crates/tantivy/src/query/query.rs b/crates/tantivy/src/query/query.rsindex 4808849b..4487729e 100644--- a/crates/tantivy/src/query/query.rs+++ b/crates/tantivy/src/query/query.rs@@ -116,9 +116,9 @@ impl<'a> EnableScoring<'a> {/// So to sum it up :/// - a `Query` is a recipe to define a set of documents as well the way to score them./// - a [`Weight`] is this recipe tied to a specific [`Searcher`]. It may for instance-/// hold statistics about the different term of the query. It is created by the query.+/// hold statistics about the different term of the query. It is created by the query./// - a [`Scorer`] is a cursor over the set of matching documents, for a specific-/// [`SegmentReader`]. It is created by the [`Weight`].+/// [`SegmentReader`]. It is created by the [`Weight`].////// When implementing a new type of `Query`, it is normal to implement a/// dedicated `Query`, [`Weight`] and [`Scorer`].@@ -169,7 +169,8 @@ pub trait QueryClone {}impl<T> QueryClone for T-where T: 'static + Query + Clone+where+ T: 'static + Query + Clone,{fn box_clone(&self) -> Box<dyn Query> {Box::new(self.clone())diff --git a/crates/tantivy/src/query/query_parser/query_parser.rs b/crates/tantivy/src/query/query_parser/query_parser.rsindex 2eb2f9b6..ef681603 100644--- a/crates/tantivy/src/query/query_parser/query_parser.rs+++ b/crates/tantivy/src/query/query_parser/query_parser.rs@@ -137,7 +137,7 @@ fn trim_ast(logical_ast: LogicalAst) -> Option<LogicalAst> {/// so-called default fields (as set up in the constructor).////// Assuming that the default fields are `body` and `title`, and the query parser is set with-/// conjunction as a default, our query will be interpreted as.+/// conjunction as a default, our query will be interpreted as./// `(body:Barack OR title:Barack) AND (title:Obama OR body:Obama)`./// By default, all tokenized and indexed fields are default fields.///@@ -149,7 +149,7 @@ fn trim_ast(logical_ast: LogicalAst) -> Option<LogicalAst> {////// * boolean operators `AND`, `OR`. `AND` takes precedence over `OR`, so that `a AND b OR c` is/// interpreted-/// as `(a AND b) OR c`.+/// as `(a AND b) OR c`.////// * In addition to the boolean operators, the `-`, `+` can help define. These operators are/// sufficient to express all queries using boolean operators. For instance `x AND y OR z` can be@@ -273,7 +273,7 @@ impl QueryParser {/// Creates a `QueryParser`, given/// * an index/// * a set of default fields used to search if no field is specifically defined- /// in the query.+ /// in the query.pub fn for_index(index: &Index, default_fields: Vec<Field>) -> QueryParser {QueryParser::new(index.schema(), default_fields, index.tokenizers().clone())}@@ -686,7 +686,7 @@ impl QueryParser {/// The terms are identified by a triplet:/// - tantivy field/// - field_path: tantivy has JSON fields. It is possible to target a member of a JSON- /// object by naturally extending the json field name with a "." separated field_path+ /// object by naturally extending the json field name with a "." separated field_path/// - field_phrase: the phrase that is being searched.////// The literal identifies the targeted field by a so-called *full field path*,diff --git a/crates/tantivy/src/query/range_query/fast_field_range_query.rs b/crates/tantivy/src/query/range_query/fast_field_range_query.rsindex a4074cdb..f49cdbc4 100644--- a/crates/tantivy/src/query/range_query/fast_field_range_query.rs+++ b/crates/tantivy/src/query/range_query/fast_field_range_query.rs@@ -49,10 +49,10 @@ pub(crate) struct RangeDocSet<T> {////// There are two patterns./// - We do a full scan. => We can load large chunks. We don't know in advance if seek call- /// will come, so we start with small chunks+ /// will come, so we start with small chunks/// - We load docs, interspersed with seek calls. When there are big jumps in the seek, we- /// should load small chunks. When the seeks are small, we can employ the same strategy as on a- /// full scan.+ /// should load small chunks. When the seeks are small, we can employ the same strategy as on a+ /// full scan.fetch_horizon: u32,/// Current batch of loaded docs.loaded_docs: VecCursor,diff --git a/crates/tantivy/src/query/range_query/range_query_ip_fastfield.rs b/crates/tantivy/src/query/range_query/range_query_ip_fastfield.rsindex d2f01ac7..60b8bcfa 100644--- a/crates/tantivy/src/query/range_query/range_query_ip_fastfield.rs+++ b/crates/tantivy/src/query/range_query/range_query_ip_fastfield.rs@@ -271,87 +271,3 @@ pub mod tests {Ok(())}}--#[cfg(all(test, feature = "unstable"))]-mod bench {-- use rand::rngs::StdRng;- use rand::{Rng, SeedableRng};-- use super::tests::*;- use super::*;- use crate::collector::Count;- use crate::query::QueryParser;- use crate::Index;-- fn get_index_0_to_100() -> Index {- let mut rng = StdRng::from_seed([1u8; 32]);- let num_vals = 100_000;- let docs: Vec<_> = (0..num_vals)- .map(|_i| {- let id = if rng.gen_bool(0.01) {- "veryfew".to_string() // 1%- } else if rng.gen_bool(0.1) {- "few".to_string() // 9%- } else {- "many".to_string() // 90%- };- Doc {- id,- // Multiply by 1000, so that we create many buckets in the compact space- // The benches depend on this range to select n-percent of elements with the- // methods below.- ip: Ipv6Addr::from_u128(rng.gen_range(0..100) * 1000),- }- })- .collect();-- create_index_from_docs(&docs)- }-- fn get_90_percent() -> RangeInclusive<Ipv6Addr> {- let start = Ipv6Addr::from_u128(0);- let end = Ipv6Addr::from_u128(90 * 1000);- start..=end- }-- fn get_10_percent() -> RangeInclusive<Ipv6Addr> {- let start = Ipv6Addr::from_u128(0);- let end = Ipv6Addr::from_u128(10 * 1000);- start..=end- }-- fn get_1_percent() -> RangeInclusive<Ipv6Addr> {- let start = Ipv6Addr::from_u128(10 * 1000);- let end = Ipv6Addr::from_u128(10 * 1000);- start..=end- }-- fn excute_query(- field: &str,- ip_range: RangeInclusive<Ipv6Addr>,- suffix: &str,- index: &Index,- ) -> usize {- let gen_query_inclusive = |from: &Ipv6Addr, to: &Ipv6Addr| {- format!(- "{}:[{} TO {}] {}",- field,- &from.to_string(),- &to.to_string(),- suffix- )- };-- let query = gen_query_inclusive(ip_range.start(), ip_range.end());- let query_from_text = |text: &str| {- QueryParser::for_index(index, vec![])- .parse_query(text)- .unwrap()- };- let query = query_from_text(&query);- let reader = index.reader().unwrap();- let searcher = reader.searcher();- searcher.search(&query, &(Count)).unwrap()- }-}diff --git a/crates/tantivy/src/query/range_query/range_query_u64_fastfield.rs b/crates/tantivy/src/query/range_query/range_query_u64_fastfield.rsindex 637d1340..2e9981bb 100644--- a/crates/tantivy/src/query/range_query/range_query_u64_fastfield.rs+++ b/crates/tantivy/src/query/range_query/range_query_u64_fastfield.rs@@ -393,78 +393,3 @@ pub mod tests {Ok(())}}--#[cfg(all(test, feature = "unstable"))]-mod bench {-- use rand::rngs::StdRng;- use rand::{Rng, SeedableRng};-- use super::tests::*;- use super::*;- use crate::collector::Count;- use crate::query::QueryParser;- use crate::Index;-- fn get_index_0_to_100() -> Index {- let mut rng = StdRng::from_seed([1u8; 32]);- let num_vals = 100_000;- let docs: Vec<_> = (0..num_vals)- .map(|_i| {- let id_name = if rng.gen_bool(0.01) {- "veryfew".to_string() // 1%- } else if rng.gen_bool(0.1) {- "few".to_string() // 9%- } else {- "many".to_string() // 90%- };- Doc {- id_name,- id: rng.gen_range(0..100),- }- })- .collect();-- create_index_from_docs(&docs)- }-- fn get_90_percent() -> RangeInclusive<u64> {- 0..=90- }-- fn get_10_percent() -> RangeInclusive<u64> {- 0..=10- }-- fn get_1_percent() -> RangeInclusive<u64> {- 10..=10- }-- fn execute_query(- field: &str,- id_range: RangeInclusive<u64>,- suffix: &str,- index: &Index,- ) -> usize {- let gen_query_inclusive = |from: &u64, to: &u64| {- format!(- "{}:[{} TO {}] {}",- field,- &from.to_string(),- &to.to_string(),- suffix- )- };-- let query = gen_query_inclusive(id_range.start(), id_range.end());- let query_from_text = |text: &str| {- QueryParser::for_index(index, vec![])- .parse_query(text)- .unwrap()- };- let query = query_from_text(&query);- let reader = index.reader().unwrap();- let searcher = reader.searcher();- searcher.search(&query, &(Count)).unwrap()- }-}diff --git a/crates/tantivy/src/schema/document/default_document.rs b/crates/tantivy/src/schema/document/default_document.rsindex 8e00fce9..40df237f 100644--- a/crates/tantivy/src/schema/document/default_document.rs+++ b/crates/tantivy/src/schema/document/default_document.rs@@ -559,7 +559,7 @@ impl BinarySerializable for ValueType {fn deserialize<R: Read>(reader: &mut R) -> io::Result<Self> {let num = u8::deserialize(reader)?;let type_id = if (0..=12).contains(&num) {- unsafe { std::mem::transmute(num) }+ unsafe { std::mem::transmute::<u8, ValueType>(num) }} else {return Err(io::Error::new(io::ErrorKind::InvalidData,diff --git a/crates/tantivy/src/schema/field_entry.rs b/crates/tantivy/src/schema/field_entry.rsindex 8d2f9b23..932a2972 100644--- a/crates/tantivy/src/schema/field_entry.rs+++ b/crates/tantivy/src/schema/field_entry.rs@@ -13,7 +13,7 @@ use crate::schema::{/// It consists of/// - a field name/// - a field type, itself wrapping up options describing-/// how the field should be indexed.+/// how the field should be indexed.#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]pub struct FieldEntry {name: String,diff --git a/crates/tantivy/src/schema/term.rs b/crates/tantivy/src/schema/term.rsindex 30d7d6ca..62261f53 100644--- a/crates/tantivy/src/schema/term.rs+++ b/crates/tantivy/src/schema/term.rs@@ -610,11 +610,11 @@ mod tests {////// - <field> is a big endian encoded u32 field id/// - <type_byte>'s most significant bit expresses whether the term is a json term or not- /// The remaining 7 bits are used to encode the type of the value.- /// If this is a JSON term, the type is the type of the leaf of the json.+ /// The remaining 7 bits are used to encode the type of the value.+ /// If this is a JSON term, the type is the type of the leaf of the json.////// - <value> is, if this is not the json term, a binary representation specific to the type.- /// If it is a JSON Term, then it is prepended with the path that leads to this leaf value.+ /// If it is a JSON Term, then it is prepended with the path that leads to this leaf value.const FAST_VALUE_TERM_LEN: usize = 4 + 1 + 8;#[test]diff --git a/crates/tantivy/src/schema/text_options.rs b/crates/tantivy/src/schema/text_options.rsindex 70300944..1b920248 100644--- a/crates/tantivy/src/schema/text_options.rs+++ b/crates/tantivy/src/schema/text_options.rs@@ -189,8 +189,8 @@ impl TokenizerName {////// It defines/// - The amount of information that should be stored about the presence of a term in a document.-/// Essentially, should we store the term frequency and/or the positions (See-/// [`IndexRecordOption`]).+/// Essentially, should we store the term frequency and/or the positions (See+/// [`IndexRecordOption`])./// - The name of the `Tokenizer` that should be used to process the field./// - Flag indicating, if fieldnorms should be stored (See [fieldnorm](crate::fieldnorm)). Defaults/// to `true`.diff --git a/crates/tantivy/src/sstable/mod.rs b/crates/tantivy/src/sstable/mod.rsindex 14e140ce..5396436e 100644--- a/crates/tantivy/src/sstable/mod.rs+++ b/crates/tantivy/src/sstable/mod.rs@@ -21,7 +21,6 @@ use crate::common::{BinarySerializable, OwnedBytes};pub use self::block_reader::BlockReader;pub use self::delta::{DeltaReader, DeltaWriter};-pub use self::merge::VoidMerge;use self::value::{RangeValueReader, RangeValueWriter};use self::value::{U64MonotonicValueReader, U64MonotonicValueWriter, ValueReader, ValueWriter};@@ -325,7 +324,8 @@ mod test {use crate::common::OwnedBytes;- use super::{common_prefix_len, MonotonicU64SSTable, SSTable, VoidMerge, VoidSSTable};+ use super::{common_prefix_len, MonotonicU64SSTable, SSTable, VoidSSTable};+ use crate::sstable::merge::VoidMerge;fn aux_test_common_prefix_len(left: &str, right: &str, expect_len: usize) {assert_eq!(diff --git a/crates/tantivy/src/sstable/value/range.rs b/crates/tantivy/src/sstable/value/range.rsindex 47f2b4f1..eeb5cbec 100644--- a/crates/tantivy/src/sstable/value/range.rs+++ b/crates/tantivy/src/sstable/value/range.rs@@ -80,7 +80,7 @@ impl ValueWriter for RangeValueWriter {#[cfg(test)]mod tests {use super::*;-+ #[allow(clippy::single_range_in_vec_init)]#[test]fn test_range_reader_writer() {crate::sstable::value::tests::test_value_reader_writer::<diff --git a/crates/tantivy/src/sstable/vint.rs b/crates/tantivy/src/sstable/vint.rsindex e15988d8..acf4d9f3 100644--- a/crates/tantivy/src/sstable/vint.rs+++ b/crates/tantivy/src/sstable/vint.rs@@ -39,8 +39,6 @@ pub fn deserialize_read(buf: &[u8]) -> (usize, u64) {#[cfg(test)]mod tests {- use std::u64;-use super::{deserialize_read, serialize};fn aux_test_int(val: u64, expect_len: usize) {diff --git a/crates/tantivy/src/stacker/memory_arena.rs b/crates/tantivy/src/stacker/memory_arena.rsindex aa43d05e..95f669bf 100644--- a/crates/tantivy/src/stacker/memory_arena.rs+++ b/crates/tantivy/src/stacker/memory_arena.rs@@ -13,12 +13,12 @@//!//! - Your object shall not implement `Drop`.//! - `Addr` to the `Arena` are 32-bits. The maximum capacity of the arena-//! is 4GB. *(Tantivy's indexer uses one arena per indexing thread.)*+//! is 4GB. *(Tantivy's indexer uses one arena per indexing thread.)*//! - The arena only works for objects much smaller than `1MB`.-//! Allocating more than `1MB` at a time will result in a panic,-//! and allocating a lot of large object (> 500KB) will result in a fragmentation.+//! Allocating more than `1MB` at a time will result in a panic,+//! and allocating a lot of large object (> 500KB) will result in a fragmentation.//! - Your objects are store in an unaligned fashion. For this reason,-//! the API does not let you access them as references.+//! the API does not let you access them as references.//!//! Instead, you store and access your data via `.write(...)` and `.read(...)`, which under the hood//! stores your object using `ptr::write_unaligned` and `ptr::read_unaligned`.diff --git a/crates/tantivy/src/stacker/mod.rs b/crates/tantivy/src/stacker/mod.rsindex 6e968fca..55729172 100644--- a/crates/tantivy/src/stacker/mod.rs+++ b/crates/tantivy/src/stacker/mod.rs@@ -10,6 +10,3 @@ pub use self::arena_hashmap::ArenaHashMap;pub use self::expull::ExpUnrolledLinkedList;pub use self::memory_arena::{Addr, MemoryArena};pub use self::shared_arena_hashmap::{compute_table_memory_size, SharedArenaHashMap};--/// When adding an element in a `ArenaHashMap`, we get a unique id associated to the given key.-pub type UnorderedId = u32;diff --git a/crates/tantivy/src/stacker/shared_arena_hashmap.rs b/crates/tantivy/src/stacker/shared_arena_hashmap.rsindex 496cd015..0ec4a6a6 100644--- a/crates/tantivy/src/stacker/shared_arena_hashmap.rs+++ b/crates/tantivy/src/stacker/shared_arena_hashmap.rs@@ -12,12 +12,8 @@ pub fn compute_table_memory_size(capacity: usize) -> usize {capacity * mem::size_of::<KeyValue>()}-#[cfg(not(feature = "compare_hash_only"))]type HashType = u32;-#[cfg(feature = "compare_hash_only")]-type HashType = u64;-/// `KeyValue` is the item stored in the hash table./// The key is actually a `BytesRef` object stored in an external memory arena./// The `value_addr` also points to an address in the memory arena.@@ -137,22 +133,10 @@ impl SharedArenaHashMap {}}- #[inline]- #[cfg(not(feature = "compare_hash_only"))]fn get_hash(&self, key: &[u8]) -> HashType {murmurhash32::murmurhash2(key)}- #[inline]- #[cfg(feature = "compare_hash_only")]- fn get_hash(&self, key: &[u8]) -> HashType {- /// Since we compare only the hash we need a high quality hash.- use std::hash::Hasher;- let mut hasher = ahash::AHasher::default();- hasher.write(key);- hasher.finish() as HashType- }-#[inline]fn probe(&self, hash: HashType) -> LinearProbing {LinearProbing::compute(hash, self.mask)@@ -177,8 +161,6 @@ impl SharedArenaHashMap {(key_bytes, addr.offset(2 + key_bytes_len as u32))}- #[inline]- #[cfg(not(feature = "compare_hash_only"))]fn get_value_addr_if_key_match(&self,target_key: &[u8],@@ -194,23 +176,6 @@ impl SharedArenaHashMap {None}}- #[inline]- #[cfg(feature = "compare_hash_only")]- fn get_value_addr_if_key_match(- &self,- _target_key: &[u8],- addr: Addr,- memory_arena: &MemoryArena,- ) -> Option<Addr> {- // For the compare_hash_only feature, it would make sense to store the keys at a different- // memory location. Here they will just pollute the cache.- let data = memory_arena.slice_from(addr);- let key_bytes_len_bytes = &data[..2];- let key_bytes_len = u16::from_le_bytes(key_bytes_len_bytes.try_into().unwrap());- let value_addr = addr.offset(2 + key_bytes_len as u32);-- Some(value_addr)- }#[inline]fn set_bucket(&mut self, hash: HashType, key_value_addr: Addr, bucket: usize) {diff --git a/crates/tantivy/src/store/compressors.rs b/crates/tantivy/src/store/compressors.rsindex 541855aa..5eeead3f 100644--- a/crates/tantivy/src/store/compressors.rs+++ b/crates/tantivy/src/store/compressors.rs@@ -13,121 +13,50 @@ pub enum Compressor {/// Use the lz4 compressor (block format)#[cfg(feature = "lz4-compression")]Lz4,- /// Use the zstd compressor- #[cfg(feature = "zstd-compression")]- Zstd(ZstdCompressor),}impl Serialize for Compressor {fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>- where S: serde::Serializer {+ where+ S: serde::Serializer,+ {match *self {Compressor::None => serializer.serialize_str("none"),#[cfg(feature = "lz4-compression")]Compressor::Lz4 => serializer.serialize_str("lz4"),- #[cfg(feature = "zstd-compression")]- Compressor::Zstd(zstd) => serializer.serialize_str(&zstd.ser_to_string()),}}}impl<'de> Deserialize<'de> for Compressor {fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>- where D: Deserializer<'de> {+ where+ D: Deserializer<'de>,+ {let buf = String::deserialize(deserializer)?;- let compressor = match buf.as_str() {- "none" => Compressor::None,- #[cfg(feature = "lz4-compression")]- "lz4" => Compressor::Lz4,- #[cfg(not(feature = "lz4-compression"))]- "lz4" => {- return Err(serde::de::Error::custom(+ let compressor =+ match buf.as_str() {+ "none" => Compressor::None,+ #[cfg(feature = "lz4-compression")]+ "lz4" => Compressor::Lz4,+ #[cfg(not(feature = "lz4-compression"))]+ "lz4" => return Err(serde::de::Error::custom("unsupported variant `lz4`, please enable Tantivy's `lz4-compression` feature",- ))- }- #[cfg(feature = "zstd-compression")]- _ if buf.starts_with("zstd") => Compressor::Zstd(- ZstdCompressor::deser_from_str(&buf).map_err(serde::de::Error::custom)?,- ),- #[cfg(not(feature = "zstd-compression"))]- _ if buf.starts_with("zstd") => {- return Err(serde::de::Error::custom(- "unsupported variant `zstd`, please enable Tantivy's `zstd-compression` \- feature",- ))- }- _ => {- return Err(serde::de::Error::unknown_variant(- &buf,- &[- "none",- #[cfg(feature = "lz4-compression")]- "lz4",- #[cfg(feature = "zstd-compression")]- "zstd",- #[cfg(feature = "zstd-compression")]- "zstd(compression_level=5)",- ],- ));- }- };-- Ok(compressor)- }-}--#[derive(Clone, Default, Debug, Copy, PartialEq, Eq, Serialize, Deserialize)]-/// The Zstd compressor, with optional compression level.-pub struct ZstdCompressor {- /// The compression level, if unset defaults to zstd::DEFAULT_COMPRESSION_LEVEL = 3- pub compression_level: Option<i32>,-}--#[cfg(feature = "zstd-compression")]-impl ZstdCompressor {- fn deser_from_str(val: &str) -> Result<ZstdCompressor, String> {- if !val.starts_with("zstd") {- return Err(format!("needs to start with zstd, but got {val}"));- }- if val == "zstd" {- return Ok(ZstdCompressor::default());- }- let options = &val["zstd".len() + 1..val.len() - 1];-- let mut compressor = ZstdCompressor::default();- for option in options.split(',') {- let (opt_name, value) = options- .split_once('=')- .ok_or_else(|| format!("no '=' found in option {option:?}"))?;-- match opt_name {- "compression_level" => {- let value = value.parse::<i32>().map_err(|err| {- format!("Could not parse value {value} of option {opt_name}, e: {err}")- })?;- if value >= 15 {- warn!(- "High zstd compression level detected: {:?}. High compression levels \- (>=15) are slow and will limit indexing speed.",- value- )- }- compressor.compression_level = Some(value);- }+ )),_ => {- return Err(format!("unknown zstd option {opt_name:?}"));+ return Err(serde::de::Error::unknown_variant(+ &buf,+ &[+ "none",+ #[cfg(feature = "lz4-compression")]+ "lz4",+ ],+ ));}- }- }+ };+Ok(compressor)}- fn ser_to_string(&self) -> String {- if let Some(compression_level) = self.compression_level {- format!("zstd(compression_level={compression_level})")- } else {- "zstd".to_string()- }- }}impl Default for Compressor {@@ -136,9 +65,6 @@ impl Default for Compressor {#[cfg(feature = "lz4-compression")]return Compressor::Lz4;- #[cfg(feature = "zstd-compression")]- return Compressor::Zstd(ZstdCompressor::default());-Compressor::None}}@@ -158,64 +84,6 @@ impl Compressor {}#[cfg(feature = "lz4-compression")]Self::Lz4 => super::compression_lz4_block::compress(uncompressed, compressed),- #[cfg(feature = "zstd-compression")]- Self::Zstd(_zstd_compressor) => super::compression_zstd_block::compress(- uncompressed,- compressed,- _zstd_compressor.compression_level,- ),}}}--#[cfg(all(feature = "zstd-compression", test))]-mod tests {- use super::*;-- #[test]- fn zstd_serde_roundtrip() {- let compressor = ZstdCompressor {- compression_level: Some(15),- };-- assert_eq!(- ZstdCompressor::deser_from_str(&compressor.ser_to_string()).unwrap(),- compressor- );-- assert_eq!(- ZstdCompressor::deser_from_str(&ZstdCompressor::default().ser_to_string()).unwrap(),- ZstdCompressor::default()- );- }-- #[test]- fn deser_zstd_test() {- assert_eq!(- ZstdCompressor::deser_from_str("zstd").unwrap(),- ZstdCompressor::default()- );-- assert!(ZstdCompressor::deser_from_str("zzstd").is_err());- assert!(ZstdCompressor::deser_from_str("zzstd()").is_err());- assert_eq!(- ZstdCompressor::deser_from_str("zstd(compression_level=15)").unwrap(),- ZstdCompressor {- compression_level: Some(15)- }- );- assert_eq!(- ZstdCompressor::deser_from_str("zstd(compresion_level=15)").unwrap_err(),- "unknown zstd option \"compresion_level\""- );- assert_eq!(- ZstdCompressor::deser_from_str("zstd(compression_level->2)").unwrap_err(),- "no '=' found in option \"compression_level->2\""- );- assert_eq!(- ZstdCompressor::deser_from_str("zstd(compression_level=over9000)").unwrap_err(),- "Could not parse value over9000 of option compression_level, e: invalid digit found \- in string"- );- }-}diff --git a/crates/tantivy/src/store/decompressors.rs b/crates/tantivy/src/store/decompressors.rsindex 4d0319ac..fe6d8c3b 100644--- a/crates/tantivy/src/store/decompressors.rs+++ b/crates/tantivy/src/store/decompressors.rs@@ -12,9 +12,6 @@ pub enum Decompressor {/// Use the lz4 decompressor (block format)#[cfg(feature = "lz4-compression")]Lz4,- /// Use the zstd decompressor- #[cfg(feature = "zstd-compression")]- Zstd,}impl From<Compressor> for Decompressor {@@ -23,8 +20,6 @@ impl From<Compressor> for Decompressor {Compressor::None => Decompressor::None,#[cfg(feature = "lz4-compression")]Compressor::Lz4 => Decompressor::Lz4,- #[cfg(feature = "zstd-compression")]- Compressor::Zstd(_) => Decompressor::Zstd,}}}@@ -35,8 +30,6 @@ impl Decompressor {0 => Decompressor::None,#[cfg(feature = "lz4-compression")]1 => Decompressor::Lz4,- #[cfg(feature = "zstd-compression")]- 4 => Decompressor::Zstd,_ => panic!("unknown compressor id {id:?}"),}}@@ -46,8 +39,6 @@ impl Decompressor {Self::None => 0,#[cfg(feature = "lz4-compression")]Self::Lz4 => 1,- #[cfg(feature = "zstd-compression")]- Self::Zstd => 4,}}@@ -71,8 +62,6 @@ impl Decompressor {}#[cfg(feature = "lz4-compression")]Self::Lz4 => super::compression_lz4_block::decompress(compressed, decompressed),- #[cfg(feature = "zstd-compression")]- Self::Zstd => super::compression_zstd_block::decompress(compressed, decompressed),}}}@@ -86,10 +75,5 @@ mod tests {assert_eq!(Decompressor::from(Compressor::None), Decompressor::None);#[cfg(feature = "lz4-compression")]assert_eq!(Decompressor::from(Compressor::Lz4), Decompressor::Lz4);- #[cfg(feature = "zstd-compression")]- assert_eq!(- Decompressor::from(Compressor::Zstd(Default::default())),- Decompressor::Zstd- );}}diff --git a/crates/tantivy/src/store/mod.rs b/crates/tantivy/src/store/mod.rsindex a8c65c88..8bd5b040 100644--- a/crates/tantivy/src/store/mod.rs+++ b/crates/tantivy/src/store/mod.rs@@ -26,7 +26,7 @@//! and should rely on either//!//! - at the segment level, the-//! [`SegmentReader`'s `doc` method](../struct.SegmentReader.html#method.doc)+//! [`SegmentReader`'s `doc` method](../struct.SegmentReader.html#method.doc)//! - at the index level, the [`Searcher::doc()`](crate::Searcher::doc) methodmod compressors;@@ -35,7 +35,7 @@ mod footer;mod index;mod reader;mod writer;-pub use self::compressors::{Compressor, ZstdCompressor};+pub use self::compressors::Compressor;pub use self::decompressors::Decompressor;pub(crate) use self::reader::DOCSTORE_CACHE_CAPACITY;pub use self::reader::{CacheStats, StoreReader};@@ -48,9 +48,6 @@ pub(crate) const DOC_STORE_VERSION: u32 = 1;#[cfg(feature = "lz4-compression")]mod compression_lz4_block;-#[cfg(feature = "zstd-compression")]-mod compression_zstd_block;-#[cfg(test)]pub mod tests {@@ -204,16 +201,6 @@ pub mod tests {test_store(Compressor::Lz4, BLOCK_SIZE, true)}- #[cfg(feature = "zstd-compression")]- #[test]- fn test_store_zstd() -> crate::Result<()> {- test_store(- Compressor::Zstd(ZstdCompressor::default()),- BLOCK_SIZE,- true,- )- }-#[test]fn test_store_with_delete() -> crate::Result<()> {let mut schema_builder = schema::Schema::builder();@@ -254,69 +241,6 @@ pub mod tests {Ok(())}- #[cfg(feature = "lz4-compression")]- #[cfg(feature = "zstd-compression")]- #[test]- fn test_merge_with_changed_compressor() -> crate::Result<()> {- let mut schema_builder = schema::Schema::builder();-- let text_field = schema_builder.add_text_field("text_field", TEXT | STORED);- let schema = schema_builder.build();- let index_builder = Index::builder().schema(schema);-- let mut index = index_builder.create_in_ram().unwrap();- index.settings_mut().docstore_compression = Compressor::Lz4;- {- let mut index_writer: IndexWriter = index.writer_for_tests().unwrap();- // put enough data create enough blocks in the doc store to be considered for stacking- for _ in 0..200 {- index_writer.add_document(doc!(text_field=> LOREM))?;- }- assert!(index_writer.commit().is_ok());- for _ in 0..200 {- index_writer.add_document(doc!(text_field=> LOREM))?;- }- assert!(index_writer.commit().is_ok());- }- assert_eq!(- index.reader().unwrap().searcher().segment_readers()[0]- .get_store_reader(10)- .unwrap()- .decompressor(),- Decompressor::Lz4- );- // Change compressor, this disables stacking on merging- let index_settings = index.settings_mut();- index_settings.docstore_compression = Compressor::Zstd(Default::default());- // Merging the segments- {- let segment_ids = index- .searchable_segment_ids()- .expect("Searchable segments failed.");- let mut index_writer: IndexWriter = index.writer_for_tests().unwrap();- assert!(index_writer.merge(&segment_ids).wait().is_ok());- assert!(index_writer.wait_merging_threads().is_ok());- }-- let searcher = index.reader().unwrap().searcher();- assert_eq!(searcher.segment_readers().len(), 1);- let reader = searcher.segment_readers().iter().last().unwrap();- let store = reader.get_store_reader(10).unwrap();-- for doc in store- .iter::<TantivyDocument>(reader.alive_bitset())- .take(50)- {- assert_eq!(- *doc?.get_first(text_field).and_then(|v| v.as_str()).unwrap(),- LOREM.to_string()- );- }- assert_eq!(store.decompressor(), Decompressor::Zstd);-- Ok(())- }-#[test]fn test_merge_of_small_segments() -> crate::Result<()> {let mut schema_builder = schema::Schema::builder();diff --git a/crates/tantivy/src/termdict/fst_termdict/merger.rs b/crates/tantivy/src/termdict/fst_termdict/merger.rsindex 3efed4b7..744cb482 100644--- a/crates/tantivy/src/termdict/fst_termdict/merger.rs+++ b/crates/tantivy/src/termdict/fst_termdict/merger.rs@@ -12,7 +12,7 @@ use crate::termdict::{TermOrdinal, TermStreamer};/// The item yielded is actually a pair with/// - the term/// - a slice with the ordinal of the segments containing-/// the term.+/// the term.pub struct TermMerger<'a> {dictionaries: Vec<&'a TermDictionary>,union: Union<'a>,@@ -92,47 +92,3 @@ impl<'a> TermMerger<'a> {})}}--#[cfg(all(test, feature = "unstable"))]-mod bench {- use rand::distributions::Alphanumeric;- use rand::{thread_rng, Rng};-- use super::TermMerger;- use crate::directory::FileSlice;- use crate::postings::TermInfo;- use crate::termdict::{TermDictionary, TermDictionaryBuilder};-- fn make_term_info(term_ord: u64) -> TermInfo {- let offset = |term_ord: u64| (term_ord * 100 + term_ord * term_ord) as usize;- TermInfo {- doc_freq: term_ord as u32,- postings_range: offset(term_ord)..offset(term_ord + 1),- positions_range: offset(term_ord)..offset(term_ord + 1),- }- }-- /// Create a dictionary of random strings.- fn rand_dict(num_terms: usize) -> std::io::Result<TermDictionary> {- let buffer: Vec<u8> = {- let mut terms = vec![];- for _i in 0..num_terms {- let rand_string: String = thread_rng()- .sample_iter(&Alphanumeric)- .take(thread_rng().gen_range(30..42))- .map(char::from)- .collect();- terms.push(rand_string);- }- terms.sort();-- let mut term_dictionary_builder = TermDictionaryBuilder::create(Vec::new())?;- for i in 0..num_terms {- term_dictionary_builder.insert(terms[i].as_bytes(), &make_term_info(i as u64))?;- }- term_dictionary_builder.finish()?- };- let file = FileSlice::from(buffer);- TermDictionary::open(file)- }-}diff --git a/crates/tantivy/src/tokenizer/tokenizer_manager.rs b/crates/tantivy/src/tokenizer/tokenizer_manager.rsindex a2be1239..9854a1b1 100644--- a/crates/tantivy/src/tokenizer/tokenizer_manager.rs+++ b/crates/tantivy/src/tokenizer/tokenizer_manager.rs@@ -14,11 +14,11 @@ use crate::tokenizer::{////// * `raw` : does not process nor tokenize the text./// * `default` : Chops the text on according to whitespace and-/// punctuation, removes tokens that are too long, and lowercases-/// tokens+/// punctuation, removes tokens that are too long, and lowercases+/// tokens/// * `en_stem` : Like `default`, but also applies stemming on the-/// resulting tokens. Stemming can improve the recall of your-/// search engine.+/// resulting tokens. Stemming can improve the recall of your+/// search engine./// * `whitespace` : Splits the text on whitespaces.#[derive(Clone)]pub struct TokenizerManager {@@ -35,7 +35,9 @@ impl TokenizerManager {/// Registers a new tokenizer associated with a given name.pub fn register<T>(&self, tokenizer_name: &str, tokenizer: T)- where TextAnalyzer: From<T> {+ where+ TextAnalyzer: From<T>,+ {let boxed_tokenizer: TextAnalyzer = TextAnalyzer::from(tokenizer);self.tokenizers.write()