Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
1
third-party/vendor/lru/.cargo-checksum.json
vendored
Normal file
1
third-party/vendor/lru/.cargo-checksum.json
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"files":{"CHANGELOG.md":"ba09c941bef48b145f1f14a868b6a2e0a4f590db65a90fadf67ee7849adefafe","Cargo.toml":"cb08ff4984f09f34a7a64875a9beac7155a42b7489573850d2dbd05d08bae0b3","LICENSE":"061dc50af2cd9340703daf61978af3200cf681b12ea67a323c33ba109a23a45e","README.md":"a9e0ca7a8ad3950a51cfa07f2c57e90856e4a86ce7812962a02d3bc93dfc40f3","src/lib.rs":"887951547541cd03f32fbde7f2fd7a10207c0bb336f28ed63b94b8d644e39757"},"package":"a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21"}
|
||||
226
third-party/vendor/lru/CHANGELOG.md
vendored
Normal file
226
third-party/vendor/lru/CHANGELOG.md
vendored
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
# Changelog
|
||||
|
||||
## [v0.11.1](https://github.com/jeromefroe/lru-rs/tree/0.11.1) - 2023-09-05
|
||||
|
||||
- Add `try_get_or_insert_mut` method.
|
||||
|
||||
## [v0.11.0](https://github.com/jeromefroe/lru-rs/tree/0.11.0) - 2023-07-11
|
||||
|
||||
- Update dependency on hashbrown to 0.14 and update MSRV to 1.64.0.
|
||||
|
||||
## [v0.10.1](https://github.com/jeromefroe/lru-rs/tree/0.10.1) - 2023-06-29
|
||||
|
||||
- Add `try_get_or_insert` method.
|
||||
|
||||
## [v0.10.0](https://github.com/jeromefroe/lru-rs/tree/0.10.0) - 2023-03-04
|
||||
|
||||
- Remove `KeyRef` from the public API.
|
||||
|
||||
## [v0.9.0](https://github.com/jeromefroe/lru-rs/tree/0.9.0) - 2022-12-31
|
||||
|
||||
- Update dependency on hashbrown to 0.13.
|
||||
- Change `LruCache.map` to hold a pointer, rather than owned `LruEntry`.
|
||||
|
||||
## [v0.8.1](https://github.com/jeromefroe/lru-rs/tree/0.8.1) - 2022-10-01
|
||||
|
||||
- Add "caching" and "no-std" to list of categories.
|
||||
|
||||
## [v0.8.0](https://github.com/jeromefroe/lru-rs/tree/0.8.0) - 2022-09-11
|
||||
|
||||
- Use `NonZeroUsize` for LRU capacity instead of usize.
|
||||
- Add `get_or_insert_mut` method which is similiar to `get_or_insert` but returns a mutable
|
||||
reference instead of an immutable reference.
|
||||
- Add `LruCache::promote` and `LruCache::demote` API to manipulate LRU order of the entry directly.
|
||||
|
||||
## [v0.7.8](https://github.com/jeromefroe/lru-rs/tree/0.7.8) - 2022-07-19
|
||||
|
||||
- Update dependency on hashbrown to 0.12.
|
||||
|
||||
## [v0.7.7](https://github.com/jeromefroe/lru-rs/tree/0.7.7) - 2022-06-14
|
||||
|
||||
- Use `FnOnce` instead of `Fn` for trait bound of `fn` in `get_or_insert`.
|
||||
|
||||
## [v0.7.6](https://github.com/jeromefroe/lru-rs/tree/0.7.6) - 2022-05-25
|
||||
|
||||
- Add `pop_entry` method.
|
||||
|
||||
## [v0.7.5](https://github.com/jeromefroe/lru-rs/tree/0.7.5) - 2022-04-04
|
||||
|
||||
- Add `push` method.
|
||||
|
||||
## [v0.7.4](https://github.com/jeromefroe/lru-rs/tree/0.7.4) - 2022-04-03
|
||||
|
||||
- Implement `IntoIterator` trait and fix lifetime bug in `get_or_insert`.
|
||||
|
||||
## [v0.7.3](https://github.com/jeromefroe/lru-rs/tree/0.7.3) - 2022-02-28
|
||||
|
||||
- Add `get_or_insert` method.
|
||||
|
||||
## [v0.7.2](https://github.com/jeromefroe/lru-rs/tree/0.7.2) - 2021-12-28
|
||||
|
||||
- Explicitly implement Borrow for Box for non-nightly.
|
||||
|
||||
## [v0.7.1](https://github.com/jeromefroe/lru-rs/tree/0.7.1) - 2021-12-18
|
||||
|
||||
- Fix lifetime of iterators.
|
||||
|
||||
## [v0.7.0](https://github.com/jeromefroe/lru-rs/tree/0.7.0) - 2021-09-14
|
||||
|
||||
- Explicitly implement Borrow for String and Vec types for non-nightly.
|
||||
|
||||
## [v0.6.6](https://github.com/jeromefroe/lru-rs/tree/0.6.6) - 2021-07-28
|
||||
|
||||
- Update dependency on hashbrown to 0.11.2.
|
||||
|
||||
## [v0.6.5](https://github.com/jeromefroe/lru-rs/tree/0.6.5) - 2021-02-12
|
||||
|
||||
- Add `unbounded_with_hasher` constructor.
|
||||
|
||||
## [v0.6.4](https://github.com/jeromefroe/lru-rs/tree/0.6.4) - 2021-02-03
|
||||
|
||||
- Fix memory leak when keys contain heap allocated data and ensure send/sync bounds apply to
|
||||
all conforming hashers.
|
||||
|
||||
## [v0.6.3](https://github.com/jeromefroe/lru-rs/tree/0.6.3) - 2020-12-19
|
||||
|
||||
- Fix memory leak in `clear` and `resize` methods.
|
||||
|
||||
## [v0.6.2](https://github.com/jeromefroe/lru-rs/tree/0.6.2) - 2020-12-12
|
||||
|
||||
- Rename `optin_builtin_traits` to `auto_traits`.
|
||||
|
||||
## [v0.6.1](https://github.com/jeromefroe/lru-rs/tree/0.6.1) - 2020-11-02
|
||||
|
||||
- Update dependency on hashbrown to 0.9.
|
||||
|
||||
## [v0.6.0](https://github.com/jeromefroe/lru-rs/tree/0.6.0) - 2020-08-02
|
||||
|
||||
- Update dependency on hashbrown to 0.8.
|
||||
|
||||
## [v0.5.3](https://github.com/jeromefroe/lru-rs/tree/0.5.3) - 2020-07-06
|
||||
|
||||
- Fix bug that causes crash when putting an item into a zero-capacity cache.
|
||||
|
||||
## [v0.5.2](https://github.com/jeromefroe/lru-rs/tree/0.5.2) - 2020-06-17
|
||||
|
||||
- Fix nightly feature.
|
||||
|
||||
## [v0.5.1](https://github.com/jeromefroe/lru-rs/tree/0.5.1) - 2020-06-02
|
||||
|
||||
- Fix memory leak whereby old entries wouldn't be dropped when cache is full.
|
||||
|
||||
## [v0.5.0](https://github.com/jeromefroe/lru-rs/tree/0.5.0) - 2020-05-28
|
||||
|
||||
- Stop gating the `alloc` crate behind the `nightly` flag.
|
||||
|
||||
## [v0.4.5](https://github.com/jeromefroe/lru-rs/tree/0.4.5) - 2020-05-25
|
||||
|
||||
- Use `as_mut_ptr` in `drop` to fix memory leak.
|
||||
|
||||
## [v0.4.4](https://github.com/jeromefroe/lru-rs/tree/0.4.4) - 2020-05-19
|
||||
|
||||
- Use `mem::MaybeUninit` for key and value fields of nodes and not the nodes themselves.
|
||||
|
||||
## [v0.4.3](https://github.com/jeromefroe/lru-rs/tree/0.4.3) - 2019-12-10
|
||||
|
||||
- Add back import of alloc crate on nightly which was accidentally removed.
|
||||
|
||||
## [v0.4.2](https://github.com/jeromefroe/lru-rs/tree/0.4.2) - 2019-12-08
|
||||
|
||||
- Make hasbrown usage optional and add MSRV documentation.
|
||||
|
||||
## [v0.4.1](https://github.com/jeromefroe/lru-rs/tree/0.4.1) - 2019-11-26
|
||||
|
||||
- Use `mem::MaybeUninit` instead of `mem::uninitialized`.
|
||||
|
||||
## [v0.4.0](https://github.com/jeromefroe/lru-rs/tree/0.4.0) - 2019-10-28
|
||||
|
||||
- Use `Borrow` trait in `contains` and `pop` methods.
|
||||
|
||||
## [v0.3.1](https://github.com/jeromefroe/lru-rs/tree/0.3.1) - 2019-10-08
|
||||
|
||||
- Implement `Debug` for `LruCache`.
|
||||
|
||||
## [v0.3.0](https://github.com/jeromefroe/lru-rs/tree/0.3.0) - 2019-10-06
|
||||
|
||||
- Update the signature of the `peek` methods to use the `Borrow` trait and add a `peek_mut` method.
|
||||
|
||||
## [v0.2.0](https://github.com/jeromefroe/lru-rs/tree/0.2.0) - 2019-09-27
|
||||
|
||||
- Release a new minor version because of an accidental breaking change in the previous release ([#50](https://github.com/jeromefroe/lru-rs/issues/50)).
|
||||
|
||||
## [v0.1.18](https://github.com/jeromefroe/lru-rs/tree/0.1.18) - 2019-09-25
|
||||
|
||||
- Add borrowed type support for get_mut.
|
||||
|
||||
## [v0.1.17](https://github.com/jeromefroe/lru-rs/tree/0.1.17) - 2019-08-21
|
||||
|
||||
- Return Option from put method which contains old value if it exists.
|
||||
|
||||
## [v0.1.16](https://github.com/jeromefroe/lru-rs/tree/0.1.16) - 2019-07-25
|
||||
|
||||
- Implement Borrow trait for KeyRef with nightly OIBIT feature.
|
||||
|
||||
## [v0.1.15](https://github.com/jeromefroe/lru-rs/tree/0.1.15) - 2019-04-13
|
||||
|
||||
- Make crate no_std compatible with nightly feature.
|
||||
|
||||
## [v0.1.14](https://github.com/jeromefroe/lru-rs/tree/0.1.14) - 2019-04-13
|
||||
|
||||
- Implement `IterMut` to be able to get a mutable iterator for the cache.
|
||||
|
||||
## [v0.1.13](https://github.com/jeromefroe/lru-rs/tree/0.1.13) - 2019-03-12
|
||||
|
||||
- Bug fix to ensure that popped items are released.
|
||||
|
||||
## [v0.1.12](https://github.com/jeromefroe/lru-rs/tree/0.1.12) - 2019-03-04
|
||||
|
||||
- Replace standard HashMap with hashbrown HashMap.
|
||||
|
||||
## [v0.1.11](https://github.com/jeromefroe/lru-rs/tree/0.1.11) - 2018-12-10
|
||||
|
||||
- Implement `Iterator` trait for the cache.
|
||||
|
||||
## [v0.1.10](https://github.com/jeromefroe/lru-rs/tree/0.1.10) - 2018-11-07
|
||||
|
||||
- Add `peek_lru` method to get the least recently used element.
|
||||
|
||||
## [v0.1.9](https://github.com/jeromefroe/lru-rs/tree/0.1.9) - 2018-10-30
|
||||
|
||||
- Add `with_hasher` constructor to allow callers to use a custom hash function.
|
||||
|
||||
## [v0.1.8](https://github.com/jeromefroe/lru-rs/tree/0.1.8) - 2018-08-19
|
||||
|
||||
- Add `pop_lru` to remove least recently used element and `unbounded` constructor.
|
||||
|
||||
## [v0.1.7](https://github.com/jeromefroe/lru-rs/tree/0.1.7) - 2018-01-22
|
||||
|
||||
- Implement `Send` and `Sync` for the cache.
|
||||
|
||||
## [v0.1.6](https://github.com/jeromefroe/lru-rs/tree/0.1.6) - 2018-01-15
|
||||
|
||||
- Add `resize` method to dynamically resize the cache.
|
||||
|
||||
## [v0.1.5](https://github.com/jeromefroe/lru-rs/tree/0.1.5) - 2018-01-15
|
||||
|
||||
- Add `get_mut` method to get a mutable reference from the cache.
|
||||
|
||||
## [v0.1.4](https://github.com/jeromefroe/lru-rs/tree/0.1.4) - 2017-02-19
|
||||
|
||||
- Add function to clear the contents of the cache.
|
||||
|
||||
## [v0.1.3](https://github.com/jeromefroe/lru-rs/tree/0.1.3) - 2017-01-02
|
||||
|
||||
- Create internal hashmap with specified capacity.
|
||||
|
||||
## [v0.1.2](https://github.com/jeromefroe/lru-rs/tree/0.1.2) - 2017-01-02
|
||||
|
||||
- Add `peek` and `contains` functions.
|
||||
|
||||
## [v0.1.1](https://github.com/jeromefroe/lru-rs/tree/0.1.1) - 2016-12-31
|
||||
|
||||
- Fix documentation link in Cargo.toml.
|
||||
|
||||
## [v0.1.0](https://github.com/jeromefroe/lru-rs/tree/0.1.0) - 2016-12-31
|
||||
|
||||
- Initial release.
|
||||
46
third-party/vendor/lru/Cargo.toml
vendored
Normal file
46
third-party/vendor/lru/Cargo.toml
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
||||
#
|
||||
# When uploading crates to the registry Cargo will automatically
|
||||
# "normalize" Cargo.toml files for maximal compatibility
|
||||
# with all versions of Cargo and also rewrite `path` dependencies
|
||||
# to registry (e.g., crates.io) dependencies.
|
||||
#
|
||||
# If you are reading this file be aware that the original Cargo.toml
|
||||
# will likely look very different (and much more reasonable).
|
||||
# See Cargo.toml.orig for the original contents.
|
||||
|
||||
[package]
|
||||
name = "lru"
|
||||
version = "0.11.1"
|
||||
authors = ["Jerome Froelich <jeromefroelic@hotmail.com>"]
|
||||
description = "A LRU cache implementation"
|
||||
homepage = "https://github.com/jeromefroe/lru-rs"
|
||||
documentation = "https://docs.rs/lru/"
|
||||
readme = "README.md"
|
||||
keywords = [
|
||||
"LRU",
|
||||
"cache",
|
||||
]
|
||||
categories = [
|
||||
"caching",
|
||||
"no-std",
|
||||
]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/jeromefroe/lru-rs.git"
|
||||
|
||||
[dependencies.hashbrown]
|
||||
version = "0.14"
|
||||
optional = true
|
||||
|
||||
[dev-dependencies.scoped_threadpool]
|
||||
version = "0.1.*"
|
||||
|
||||
[dev-dependencies.stats_alloc]
|
||||
version = "0.1.*"
|
||||
|
||||
[features]
|
||||
default = ["hashbrown"]
|
||||
nightly = [
|
||||
"hashbrown",
|
||||
"hashbrown/nightly",
|
||||
]
|
||||
21
third-party/vendor/lru/LICENSE
vendored
Normal file
21
third-party/vendor/lru/LICENSE
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2016 Jerome Froelich
|
||||
|
||||
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.
|
||||
63
third-party/vendor/lru/README.md
vendored
Normal file
63
third-party/vendor/lru/README.md
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# LRU Cache
|
||||
|
||||
[![Travis Badge]][build status]
|
||||
[![Codecov Badge]][coverage status]
|
||||
[![crates.io Badge]][crates.io package]
|
||||
[![docs.rs Badge]][docs.rs documentation]
|
||||
[![License Badge]][license]
|
||||
|
||||
[Documentation]
|
||||
|
||||
An implementation of a LRU cache. The cache supports `put`, `get`, `get_mut` and `pop` operations,
|
||||
all of which are O(1). This crate was heavily influenced by the [LRU Cache implementation in an
|
||||
earlier version of Rust's std::collections crate].
|
||||
|
||||
The MSRV for this crate is 1.64.0.
|
||||
|
||||
## Example
|
||||
|
||||
Below is a simple example of how to instantiate and use a LRU cache.
|
||||
|
||||
```rust,no_run
|
||||
extern crate lru;
|
||||
|
||||
use lru::LruCache;
|
||||
use std::num::NonZeroUsize;
|
||||
|
||||
fn main() {
|
||||
let mut cache = LruCache::new(NonZeroUsize::new(2).unwrap());
|
||||
cache.put("apple", 3);
|
||||
cache.put("banana", 2);
|
||||
|
||||
assert_eq!(*cache.get(&"apple").unwrap(), 3);
|
||||
assert_eq!(*cache.get(&"banana").unwrap(), 2);
|
||||
assert!(cache.get(&"pear").is_none());
|
||||
|
||||
assert_eq!(cache.put("banana", 4), Some(2));
|
||||
assert_eq!(cache.put("pear", 5), None);
|
||||
|
||||
assert_eq!(*cache.get(&"pear").unwrap(), 5);
|
||||
assert_eq!(*cache.get(&"banana").unwrap(), 4);
|
||||
assert!(cache.get(&"apple").is_none());
|
||||
|
||||
{
|
||||
let v = cache.get_mut(&"banana").unwrap();
|
||||
*v = 6;
|
||||
}
|
||||
|
||||
assert_eq!(*cache.get(&"banana").unwrap(), 6);
|
||||
}
|
||||
```
|
||||
|
||||
[travis badge]: https://travis-ci.org/jeromefroe/lru-rs.svg?branch=master
|
||||
[build status]: https://travis-ci.org/jeromefroe/lru-rs
|
||||
[codecov badge]: https://codecov.io/gh/jeromefroe/lru-rs/branch/master/graph/badge.svg
|
||||
[coverage status]: https://codecov.io/gh/jeromefroe/lru-rs
|
||||
[crates.io badge]: https://img.shields.io/crates/v/lru.svg
|
||||
[crates.io package]: https://crates.io/crates/lru/
|
||||
[documentation]: https://docs.rs/lru/
|
||||
[docs.rs badge]: https://docs.rs/lru/badge.svg
|
||||
[docs.rs documentation]: https://docs.rs/lru/
|
||||
[license badge]: https://img.shields.io/badge/license-MIT-blue.svg
|
||||
[license]: https://raw.githubusercontent.com/jeromefroe/lru-rs/master/LICENSE
|
||||
[lru cache implementation in an earlier version of rust's std::collections crate]: https://doc.rust-lang.org/0.12.0/std/collections/lru_cache/struct.LruCache.html
|
||||
2224
third-party/vendor/lru/src/lib.rs
vendored
Normal file
2224
third-party/vendor/lru/src/lib.rs
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue