Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/.cargo-ok +1 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/.cargo_vcs_info.json +5 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/.gitignore +2 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/Cargo.toml +61 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/Cargo.toml.orig +47 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/LICENSE +43 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/README.md +17 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/.cargo-ok +1 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/.cargo_vcs_info.json +6 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/.gitignore +2 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/.travis.yml +22 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/Cargo.lock +7 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/Cargo.toml +35 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/Cargo.toml.orig +18 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/LICENSE +12 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/README.md +213 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-stdlib-0.2.2/.cargo-ok +1 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-stdlib-0.2.2/.cargo_vcs_info.json +6 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-stdlib-0.2.2/Cargo.lock +16 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-stdlib-0.2.2/Cargo.toml +38 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-stdlib-0.2.2/Cargo.toml.orig +21 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-stdlib-0.2.2/README.md +205 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/.cargo-ok +1 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/.cargo_vcs_info.json +6 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/Cargo.lock +120 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/Cargo.toml +186 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/Cargo.toml.orig +38 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/LICENSE-APACHE +202 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/LICENSE-MIT +19 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/README.md +30 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/.cargo-ok +1 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/.cargo_vcs_info.json +6 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/.gitignore +2 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/Cargo.toml +41 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/Cargo.toml.orig +22 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/LICENSE-APACHE +201 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/LICENSE-MIT +22 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/README.md +64 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/RELEASES.md +193 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/tests.rs +143 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/.cargo-ok +1 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/.cargo_vcs_info.json +6 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/.gitignore +5 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/CHANGELOG.md +648 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/CODE_OF_CONDUCT.md +73 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/CONTRIBUTING.md +9 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/Cargo.lock +325 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/Cargo.toml +120 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/Cargo.toml.orig +41 -0
- .cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/LICENSE-APACHE +201 -0
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/.cargo-ok
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"v":1}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/.cargo_vcs_info.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"git": {
|
| 3 |
+
"sha1": "2ff95ca1db58c9db85ddaf59e4755e4ae94ac49d"
|
| 4 |
+
}
|
| 5 |
+
}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
target
|
| 2 |
+
Cargo.lock
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/Cargo.toml
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
| 2 |
+
#
|
| 3 |
+
# When uploading crates to the registry Cargo will automatically
|
| 4 |
+
# "normalize" Cargo.toml files for maximal compatibility
|
| 5 |
+
# with all versions of Cargo and also rewrite `path` dependencies
|
| 6 |
+
# to registry (e.g., crates.io) dependencies
|
| 7 |
+
#
|
| 8 |
+
# If you believe there's an error in this file please file an
|
| 9 |
+
# issue against the rust-lang/cargo repository. If you're
|
| 10 |
+
# editing this file be aware that the upstream Cargo.toml
|
| 11 |
+
# will likely look very different (and much more reasonable)
|
| 12 |
+
|
| 13 |
+
[package]
|
| 14 |
+
edition = "2018"
|
| 15 |
+
name = "adler32"
|
| 16 |
+
version = "1.2.0"
|
| 17 |
+
authors = ["Remi Rampin <remirampin@gmail.com>"]
|
| 18 |
+
description = "Minimal Adler32 implementation for Rust."
|
| 19 |
+
documentation = "https://docs.rs/adler32/"
|
| 20 |
+
readme = "README.md"
|
| 21 |
+
keywords = ["adler32", "hash", "rolling"]
|
| 22 |
+
license = "Zlib"
|
| 23 |
+
repository = "https://github.com/remram44/adler32-rs"
|
| 24 |
+
|
| 25 |
+
[lib]
|
| 26 |
+
bench = false
|
| 27 |
+
|
| 28 |
+
[[bench]]
|
| 29 |
+
name = "bench"
|
| 30 |
+
path = "src/bench.rs"
|
| 31 |
+
harness = false
|
| 32 |
+
[dependencies.compiler_builtins]
|
| 33 |
+
version = "0.1.2"
|
| 34 |
+
optional = true
|
| 35 |
+
|
| 36 |
+
[dependencies.core]
|
| 37 |
+
version = "1.0.0"
|
| 38 |
+
optional = true
|
| 39 |
+
package = "rustc-std-workspace-core"
|
| 40 |
+
[dev-dependencies.criterion]
|
| 41 |
+
version = "0.3"
|
| 42 |
+
|
| 43 |
+
[dev-dependencies.getrandom]
|
| 44 |
+
version = "0.1"
|
| 45 |
+
features = ["wasm-bindgen"]
|
| 46 |
+
|
| 47 |
+
[dev-dependencies.humansize]
|
| 48 |
+
version = "1.1"
|
| 49 |
+
|
| 50 |
+
[dev-dependencies.rand]
|
| 51 |
+
version = "0.7"
|
| 52 |
+
|
| 53 |
+
[features]
|
| 54 |
+
default = ["std"]
|
| 55 |
+
rustc-dep-of-std = ["core", "compiler_builtins"]
|
| 56 |
+
std = []
|
| 57 |
+
[target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen]
|
| 58 |
+
version = "0.2.63"
|
| 59 |
+
|
| 60 |
+
[target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-test]
|
| 61 |
+
version = "0.3"
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/Cargo.toml.orig
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[package]
|
| 2 |
+
name = "adler32"
|
| 3 |
+
version = "1.2.0"
|
| 4 |
+
authors = ["Remi Rampin <remirampin@gmail.com>"]
|
| 5 |
+
edition = "2018"
|
| 6 |
+
description = "Minimal Adler32 implementation for Rust."
|
| 7 |
+
documentation = "https://docs.rs/adler32/"
|
| 8 |
+
repository = "https://github.com/remram44/adler32-rs"
|
| 9 |
+
readme = "README.md"
|
| 10 |
+
keywords = ["adler32", "hash", "rolling"]
|
| 11 |
+
license = "Zlib"
|
| 12 |
+
|
| 13 |
+
[dependencies]
|
| 14 |
+
# Internal features, only used when building as part of libstd, not part of the
|
| 15 |
+
# stable interface of this crate.
|
| 16 |
+
core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core' }
|
| 17 |
+
compiler_builtins = { version = '0.1.2', optional = true }
|
| 18 |
+
|
| 19 |
+
[features]
|
| 20 |
+
default = ['std']
|
| 21 |
+
std = []
|
| 22 |
+
|
| 23 |
+
# Internal feature, only used when building as part of libstd, not part of the
|
| 24 |
+
# stable interface of this crate.
|
| 25 |
+
rustc-dep-of-std = ['core', 'compiler_builtins']
|
| 26 |
+
|
| 27 |
+
[dev-dependencies]
|
| 28 |
+
# The lines marked 'benchmark only' get removed on CI for platforms/versions
|
| 29 |
+
# where we don't run the benchmarks (e.g. versions not supported by criterion)
|
| 30 |
+
criterion = "0.3" # benchmark only
|
| 31 |
+
humansize = "1.1" # benchmark only
|
| 32 |
+
rand = "0.7"
|
| 33 |
+
getrandom = { version = "0.1", features = ["wasm-bindgen"] }
|
| 34 |
+
|
| 35 |
+
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
| 36 |
+
wasm-bindgen = "0.2.63"
|
| 37 |
+
wasm-bindgen-test = "0.3"
|
| 38 |
+
|
| 39 |
+
[[bench]]
|
| 40 |
+
path = "src/bench.rs"
|
| 41 |
+
name = "bench"
|
| 42 |
+
harness = false
|
| 43 |
+
|
| 44 |
+
[lib]
|
| 45 |
+
# Disable `libtest` so Criterion-only parameters like `--save-baseline` work.
|
| 46 |
+
# See https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options
|
| 47 |
+
bench = false
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/LICENSE
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright notice for the Rust port:
|
| 2 |
+
|
| 3 |
+
(C) 2016 Remi Rampin and adler32-rs contributors
|
| 4 |
+
|
| 5 |
+
This software is provided 'as-is', without any express or implied
|
| 6 |
+
warranty. In no event will the authors be held liable for any damages
|
| 7 |
+
arising from the use of this software.
|
| 8 |
+
|
| 9 |
+
Permission is granted to anyone to use this software for any purpose,
|
| 10 |
+
including commercial applications, and to alter it and redistribute it
|
| 11 |
+
freely, subject to the following restrictions:
|
| 12 |
+
|
| 13 |
+
1. The origin of this software must not be misrepresented; you must not
|
| 14 |
+
claim that you wrote the original software. If you use this software
|
| 15 |
+
in a product, an acknowledgment in the product documentation would be
|
| 16 |
+
appreciated but is not required.
|
| 17 |
+
2. Altered source versions must be plainly marked as such, and must not be
|
| 18 |
+
misrepresented as being the original software.
|
| 19 |
+
3. This notice may not be removed or altered from any source distribution.
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
Copyright notice for the original C code from the zlib project:
|
| 23 |
+
|
| 24 |
+
(C) 1995-2017 Jean-loup Gailly and Mark Adler
|
| 25 |
+
|
| 26 |
+
This software is provided 'as-is', without any express or implied
|
| 27 |
+
warranty. In no event will the authors be held liable for any damages
|
| 28 |
+
arising from the use of this software.
|
| 29 |
+
|
| 30 |
+
Permission is granted to anyone to use this software for any purpose,
|
| 31 |
+
including commercial applications, and to alter it and redistribute it
|
| 32 |
+
freely, subject to the following restrictions:
|
| 33 |
+
|
| 34 |
+
1. The origin of this software must not be misrepresented; you must not
|
| 35 |
+
claim that you wrote the original software. If you use this software
|
| 36 |
+
in a product, an acknowledgment in the product documentation would be
|
| 37 |
+
appreciated but is not required.
|
| 38 |
+
2. Altered source versions must be plainly marked as such, and must not be
|
| 39 |
+
misrepresented as being the original software.
|
| 40 |
+
3. This notice may not be removed or altered from any source distribution.
|
| 41 |
+
|
| 42 |
+
Jean-loup Gailly Mark Adler
|
| 43 |
+
jloup@gzip.org madler@alumni.caltech.edu
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/adler32-1.2.0/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[](https://github.com/remram44/adler32-rs/actions)
|
| 2 |
+
[](https://ci.appveyor.com/project/remram44/adler32-rs)
|
| 3 |
+
[](https://crates.io/crates/adler32)
|
| 4 |
+
[](https://docs.rs/adler32)
|
| 5 |
+
[](https://github.com/remram44/adler32-rs/blob/master/LICENSE)
|
| 6 |
+
|
| 7 |
+
What is this?
|
| 8 |
+
=============
|
| 9 |
+
|
| 10 |
+
It is an implementation of the [Adler32 rolling hash algorithm](https://en.wikipedia.org/wiki/Adler-32) in the [Rust programming language](https://www.rust-lang.org/).
|
| 11 |
+
|
| 12 |
+
It is adapted from Jean-Loup Gailly's and Mark Adler's [original implementation in zlib](https://github.com/madler/zlib/blob/2fa463bacfff79181df1a5270fb67cc679a53e71/adler32.c).
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#### Minimum Supported Version of Rust (MSRV)
|
| 16 |
+
|
| 17 |
+
`adler32-rs` can be built with Rust version 1.33 or later. This version may be raised in the future but that will be accompanied by a minor version increase.
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/.cargo-ok
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"v":1}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/.cargo_vcs_info.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"git": {
|
| 3 |
+
"sha1": "6032b6a9b20e03737135c55a0270ccffcc1438ef"
|
| 4 |
+
},
|
| 5 |
+
"path_in_vcs": ""
|
| 6 |
+
}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Cargo.lock
|
| 2 |
+
target
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/.travis.yml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
language: rust
|
| 2 |
+
rust:
|
| 3 |
+
- nightly
|
| 4 |
+
- stable
|
| 5 |
+
- 1.12.0
|
| 6 |
+
- 1.8.0
|
| 7 |
+
|
| 8 |
+
os:
|
| 9 |
+
- linux
|
| 10 |
+
- osx
|
| 11 |
+
|
| 12 |
+
script:
|
| 13 |
+
- cargo test
|
| 14 |
+
- cargo test --features=unsafe --release
|
| 15 |
+
- cd alloc-stdlib && cargo test && cd ..
|
| 16 |
+
- cd alloc-stdlib && cargo test --release --features=unsafe && cd ..
|
| 17 |
+
- cd alloc-stdlib && cargo test --release && cd ..
|
| 18 |
+
|
| 19 |
+
matrix:
|
| 20 |
+
exclude:
|
| 21 |
+
- rust: 1.8.0
|
| 22 |
+
os: osx
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/Cargo.lock
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is automatically @generated by Cargo.
|
| 2 |
+
# It is not intended for manual editing.
|
| 3 |
+
version = 3
|
| 4 |
+
|
| 5 |
+
[[package]]
|
| 6 |
+
name = "alloc-no-stdlib"
|
| 7 |
+
version = "2.0.4"
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/Cargo.toml
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
| 2 |
+
#
|
| 3 |
+
# When uploading crates to the registry Cargo will automatically
|
| 4 |
+
# "normalize" Cargo.toml files for maximal compatibility
|
| 5 |
+
# with all versions of Cargo and also rewrite `path` dependencies
|
| 6 |
+
# to registry (e.g., crates.io) dependencies.
|
| 7 |
+
#
|
| 8 |
+
# If you are reading this file be aware that the original Cargo.toml
|
| 9 |
+
# will likely look very different (and much more reasonable).
|
| 10 |
+
# See Cargo.toml.orig for the original contents.
|
| 11 |
+
|
| 12 |
+
[package]
|
| 13 |
+
name = "alloc-no-stdlib"
|
| 14 |
+
version = "2.0.4"
|
| 15 |
+
authors = ["Daniel Reiter Horn <danielrh@dropbox.com>"]
|
| 16 |
+
autobins = false
|
| 17 |
+
description = "A dynamic allocator that may be used with or without the stdlib. This allows a package with nostd to allocate memory dynamically and be used either with a custom allocator, items on the stack, or by a package that wishes to simply use Box<>. It also provides options to use calloc or a mutable global variable for pre-zeroed memory"
|
| 18 |
+
homepage = "https://github.com/dropbox/rust-alloc-no-stdlib"
|
| 19 |
+
documentation = "https://raw.githubusercontent.com/dropbox/rust-alloc-no-stdlib/master/tests/lib.rs"
|
| 20 |
+
readme = "README.md"
|
| 21 |
+
keywords = [
|
| 22 |
+
"custom",
|
| 23 |
+
"allocator",
|
| 24 |
+
"calloc",
|
| 25 |
+
"safe",
|
| 26 |
+
"nostd",
|
| 27 |
+
]
|
| 28 |
+
license = "BSD-3-Clause"
|
| 29 |
+
repository = "https://github.com/dropbox/rust-alloc-no-stdlib"
|
| 30 |
+
|
| 31 |
+
[[bin]]
|
| 32 |
+
name = "example"
|
| 33 |
+
|
| 34 |
+
[features]
|
| 35 |
+
unsafe = []
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/Cargo.toml.orig
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[package]
|
| 2 |
+
name = "alloc-no-stdlib"
|
| 3 |
+
description = "A dynamic allocator that may be used with or without the stdlib. This allows a package with nostd to allocate memory dynamically and be used either with a custom allocator, items on the stack, or by a package that wishes to simply use Box<>. It also provides options to use calloc or a mutable global variable for pre-zeroed memory"
|
| 4 |
+
version = "2.0.4"
|
| 5 |
+
authors = ["Daniel Reiter Horn <danielrh@dropbox.com>"]
|
| 6 |
+
documentation = "https://raw.githubusercontent.com/dropbox/rust-alloc-no-stdlib/master/tests/lib.rs"
|
| 7 |
+
homepage = "https://github.com/dropbox/rust-alloc-no-stdlib"
|
| 8 |
+
readme = "README.md"
|
| 9 |
+
keywords = ["custom", "allocator", "calloc", "safe", "nostd"]
|
| 10 |
+
license = "BSD-3-Clause"
|
| 11 |
+
repository = "https://github.com/dropbox/rust-alloc-no-stdlib"
|
| 12 |
+
autobins = false
|
| 13 |
+
|
| 14 |
+
[[bin]]
|
| 15 |
+
name = "example"
|
| 16 |
+
|
| 17 |
+
[features]
|
| 18 |
+
unsafe = []
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) 2016 Dropbox, Inc.
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
| 5 |
+
|
| 6 |
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
| 7 |
+
|
| 8 |
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
| 9 |
+
|
| 10 |
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
| 11 |
+
|
| 12 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-no-stdlib-2.0.4/README.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Framework for allocating memory in #![no_std] modules.
|
| 2 |
+
|
| 3 |
+
[](https://crates.io/crates/alloc-no-stdlib)
|
| 4 |
+
[](https://travis-ci.org/dropbox/rust-alloc-no-stdlib)
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
## Requirements
|
| 8 |
+
* Rust 1.6
|
| 9 |
+
|
| 10 |
+
## Documentation
|
| 11 |
+
Currently there is no standard way to allocate memory from within a module that is no_std.
|
| 12 |
+
This provides a mechanism to describe a memory allocation that can be satisfied entirely on
|
| 13 |
+
the stack, by unsafely linking to calloc, or by unsafely referencing a mutable global variable.
|
| 14 |
+
This library currently will leak memory if free_cell isn't specifically invoked on memory.
|
| 15 |
+
|
| 16 |
+
However, if linked by a library that actually can depend on the stdlib then that library
|
| 17 |
+
can simply pass in a few allocators and use the standard Box allocation and will free automatically.
|
| 18 |
+
|
| 19 |
+
This library should also make it possible to entirely jail a rust application that needs dynamic
|
| 20 |
+
allocations by preallocating a maximum limit of data upfront using calloc and
|
| 21 |
+
using seccomp to disallow future syscalls.
|
| 22 |
+
|
| 23 |
+
## Usage
|
| 24 |
+
|
| 25 |
+
There are 3 modes for allocating memory, each with advantages and disadvantages
|
| 26 |
+
|
| 27 |
+
### On the stack
|
| 28 |
+
This is possible without the stdlib at all
|
| 29 |
+
However, this eats into the natural ulimit on the stack depth and generally
|
| 30 |
+
limits the program to only a few megs of dynamically allocated data
|
| 31 |
+
|
| 32 |
+
Example:
|
| 33 |
+
|
| 34 |
+
```rust
|
| 35 |
+
// First define a struct to hold all the array on the stack.
|
| 36 |
+
declare_stack_allocator_struct!(StackAllocatedFreelist4, 4, stack);
|
| 37 |
+
// since generics cannot be used, the actual struct to hold the memory must be defined with a macro
|
| 38 |
+
...
|
| 39 |
+
|
| 40 |
+
// in the code where the memory must be used, first the array needs to be readied
|
| 41 |
+
let mut stack_buffer = define_allocator_memory_pool!(4, u8, [0; 65536], stack);
|
| 42 |
+
// then an allocator needs to be made and pointed to the stack_buffer on the stack
|
| 43 |
+
// the final argument tells the system if free'd data should be zero'd before being
|
| 44 |
+
// reused by a subsequent call to alloc_cell
|
| 45 |
+
let mut ags = StackAllocatedFreelist4::<u8>::new_allocator(&mut stack_buffer, bzero);
|
| 46 |
+
{
|
| 47 |
+
// now we can get memory dynamically
|
| 48 |
+
let mut x = ags.alloc_cell(9999);
|
| 49 |
+
x.slice_mut()[0] = 4;
|
| 50 |
+
// get more memory
|
| 51 |
+
let mut y = ags.alloc_cell(4);
|
| 52 |
+
y[0] = 5;
|
| 53 |
+
// and free it, consuming the buffer
|
| 54 |
+
ags.free_cell(y);
|
| 55 |
+
|
| 56 |
+
//y.mem[0] = 6; // <-- this is an error: won't compile (use after free)
|
| 57 |
+
assert_eq!(x[0], 4);
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
### On the heap
|
| 61 |
+
This uses the standard Box facilities to allocate memory
|
| 62 |
+
|
| 63 |
+
```rust
|
| 64 |
+
let mut halloc = HeapAlloc::<u8>::new(0);
|
| 65 |
+
for _i in 1..10 { // heap test
|
| 66 |
+
let mut x = halloc.alloc_cell(100000);
|
| 67 |
+
x[0] = 4;
|
| 68 |
+
let mut y = halloc.alloc_cell(110000);
|
| 69 |
+
y[0] = 5;
|
| 70 |
+
let mut z = halloc.alloc_cell(120000);
|
| 71 |
+
z[0] = 6;
|
| 72 |
+
assert_eq!(y[0], 5);
|
| 73 |
+
halloc.free_cell(y);
|
| 74 |
+
assert_eq!(x[0], 4);
|
| 75 |
+
assert_eq!(x[9], 0);
|
| 76 |
+
assert_eq!(z[0], 6);
|
| 77 |
+
}
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
### On the heap, but uninitialized
|
| 81 |
+
This does allocate data every time it is requested, but it does not allocate the
|
| 82 |
+
memory, so naturally it is unsafe. The caller must initialize the memory properly
|
| 83 |
+
```rust
|
| 84 |
+
let mut halloc = unsafe{HeapAllocUninitialized::<u8>::new()};
|
| 85 |
+
{ // heap test
|
| 86 |
+
let mut x = halloc.alloc_cell(100000);
|
| 87 |
+
x[0] = 4;
|
| 88 |
+
let mut y = halloc.alloc_cell(110000);
|
| 89 |
+
y[0] = 5;
|
| 90 |
+
let mut z = halloc.alloc_cell(120000);
|
| 91 |
+
z[0] = 6;
|
| 92 |
+
assert_eq!(y[0], 5);
|
| 93 |
+
halloc.free_cell(y);
|
| 94 |
+
assert_eq!(x[0], 4);
|
| 95 |
+
assert_eq!(x[9], 0);
|
| 96 |
+
assert_eq!(z[0], 6);
|
| 97 |
+
...
|
| 98 |
+
}
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
### On the heap in a single pool allocation
|
| 103 |
+
This does a single big allocation on the heap, after which no further usage of the stdlib
|
| 104 |
+
will happen. This can be useful for a jailed application that wishes to restrict syscalls
|
| 105 |
+
at this point
|
| 106 |
+
|
| 107 |
+
```rust
|
| 108 |
+
use alloc_no_stdlib::HeapPrealloc;
|
| 109 |
+
...
|
| 110 |
+
let mut heap_global_buffer = define_allocator_memory_pool!(4096, u8, [0; 6 * 1024 * 1024], heap);
|
| 111 |
+
let mut ags = HeapPrealloc::<u8>::new_allocator(4096, &mut heap_global_buffer, uninitialized);
|
| 112 |
+
{
|
| 113 |
+
let mut x = ags.alloc_cell(9999);
|
| 114 |
+
x.slice_mut()[0] = 4;
|
| 115 |
+
let mut y = ags.alloc_cell(4);
|
| 116 |
+
y[0] = 5;
|
| 117 |
+
ags.free_cell(y);
|
| 118 |
+
|
| 119 |
+
//y.mem[0] = 6; // <-- this is an error (use after free)
|
| 120 |
+
}
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
### On the heap, uninitialized
|
| 126 |
+
This does a single big allocation on the heap, after which no further usage of the stdlib
|
| 127 |
+
will happen. This can be useful for a jailed application that wishes to restrict syscalls
|
| 128 |
+
at this point. This option keep does not set the memory to a valid value, so it is
|
| 129 |
+
necessarily marked unsafe
|
| 130 |
+
|
| 131 |
+
```rust
|
| 132 |
+
use alloc_no_stdlib::HeapPrealloc;
|
| 133 |
+
...
|
| 134 |
+
let mut heap_global_buffer = unsafe{HeapPrealloc::<u8>::new_uninitialized_memory_pool(6 * 1024 * 1024)};
|
| 135 |
+
let mut ags = HeapPrealloc::<u8>::new_allocator(4096, &mut heap_global_buffer, uninitialized);
|
| 136 |
+
{
|
| 137 |
+
let mut x = ags.alloc_cell(9999);
|
| 138 |
+
x.slice_mut()[0] = 4;
|
| 139 |
+
let mut y = ags.alloc_cell(4);
|
| 140 |
+
y[0] = 5;
|
| 141 |
+
ags.free_cell(y);
|
| 142 |
+
|
| 143 |
+
//y.mem[0] = 6; // <-- this is an error (use after free)
|
| 144 |
+
}
|
| 145 |
+
```
|
| 146 |
+
|
| 147 |
+
### With calloc
|
| 148 |
+
This is the most efficient way to get a zero'd dynamically sized buffer without the stdlib
|
| 149 |
+
It does invoke the C calloc function and hence must invoke unsafe code.
|
| 150 |
+
In this version, the number of cells are fixed to the parameter specified in the struct definition
|
| 151 |
+
(4096 in this example)
|
| 152 |
+
|
| 153 |
+
```rust
|
| 154 |
+
extern {
|
| 155 |
+
fn calloc(n_elem : usize, el_size : usize) -> *mut u8;
|
| 156 |
+
fn malloc(len : usize) -> *mut u8;
|
| 157 |
+
fn free(item : *mut u8);
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
declare_stack_allocator_struct!(CallocAllocatedFreelist4096, 4096, calloc);
|
| 161 |
+
...
|
| 162 |
+
|
| 163 |
+
// the buffer is defined with 200 megs of zero'd memory from calloc
|
| 164 |
+
let mut calloc_global_buffer = unsafe {define_allocator_memory_pool!(4096, u8, [0; 200 * 1024 * 1024], calloc)};
|
| 165 |
+
// and assigned to a new_allocator
|
| 166 |
+
let mut ags = CallocAllocatedFreelist4096::<u8>::new_allocator(&mut calloc_global_buffer.data, bzero);
|
| 167 |
+
{
|
| 168 |
+
let mut x = ags.alloc_cell(9999);
|
| 169 |
+
x.slice_mut()[0] = 4;
|
| 170 |
+
let mut y = ags.alloc_cell(4);
|
| 171 |
+
y[0] = 5;
|
| 172 |
+
ags.free_cell(y);
|
| 173 |
+
//y.mem[0] = 6; // <-- this is an error (use after free)
|
| 174 |
+
}
|
| 175 |
+
```
|
| 176 |
+
|
| 177 |
+
### With a static, mutable buffer
|
| 178 |
+
If a single buffer of data is needed for the entire span of the application
|
| 179 |
+
Then the simplest way to do so without a zero operation on
|
| 180 |
+
the memory and without using the stdlib is to simply have a global allocated
|
| 181 |
+
structure. Accessing mutable static variables requires unsafe code; however,
|
| 182 |
+
so this code will invoke an unsafe block.
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
Make sure to only reference global_buffer in a single place, at a single time in the code
|
| 186 |
+
If it is used from two places or at different times, undefined behavior may result,
|
| 187 |
+
since multiple allocators may get access to global_buffer.
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
```rust
|
| 191 |
+
declare_stack_allocator_struct!(GlobalAllocatedFreelist, 16, global);
|
| 192 |
+
define_allocator_memory_pool!(16, u8, [0; 1024 * 1024 * 100], global, global_buffer);
|
| 193 |
+
|
| 194 |
+
...
|
| 195 |
+
// this references a global buffer
|
| 196 |
+
let mut ags = GlobalAllocatedFreelist::<u8>::new_allocator(bzero);
|
| 197 |
+
unsafe {
|
| 198 |
+
bind_global_buffers_to_allocator!(ags, global_buffer, u8);
|
| 199 |
+
}
|
| 200 |
+
{
|
| 201 |
+
let mut x = ags.alloc_cell(9999);
|
| 202 |
+
x.slice_mut()[0] = 4;
|
| 203 |
+
let mut y = ags.alloc_cell(4);
|
| 204 |
+
y[0] = 5;
|
| 205 |
+
ags.free_cell(y);
|
| 206 |
+
|
| 207 |
+
//y.mem[0] = 6; // <-- this is an error (use after free)
|
| 208 |
+
}
|
| 209 |
+
```
|
| 210 |
+
|
| 211 |
+
|
| 212 |
+
## Contributors
|
| 213 |
+
- Daniel Reiter Horn
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-stdlib-0.2.2/.cargo-ok
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"v":1}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-stdlib-0.2.2/.cargo_vcs_info.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"git": {
|
| 3 |
+
"sha1": "6032b6a9b20e03737135c55a0270ccffcc1438ef"
|
| 4 |
+
},
|
| 5 |
+
"path_in_vcs": "alloc-stdlib"
|
| 6 |
+
}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-stdlib-0.2.2/Cargo.lock
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is automatically @generated by Cargo.
|
| 2 |
+
# It is not intended for manual editing.
|
| 3 |
+
version = 3
|
| 4 |
+
|
| 5 |
+
[[package]]
|
| 6 |
+
name = "alloc-no-stdlib"
|
| 7 |
+
version = "2.0.4"
|
| 8 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 9 |
+
checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
|
| 10 |
+
|
| 11 |
+
[[package]]
|
| 12 |
+
name = "alloc-stdlib"
|
| 13 |
+
version = "0.2.2"
|
| 14 |
+
dependencies = [
|
| 15 |
+
"alloc-no-stdlib",
|
| 16 |
+
]
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-stdlib-0.2.2/Cargo.toml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
| 2 |
+
#
|
| 3 |
+
# When uploading crates to the registry Cargo will automatically
|
| 4 |
+
# "normalize" Cargo.toml files for maximal compatibility
|
| 5 |
+
# with all versions of Cargo and also rewrite `path` dependencies
|
| 6 |
+
# to registry (e.g., crates.io) dependencies.
|
| 7 |
+
#
|
| 8 |
+
# If you are reading this file be aware that the original Cargo.toml
|
| 9 |
+
# will likely look very different (and much more reasonable).
|
| 10 |
+
# See Cargo.toml.orig for the original contents.
|
| 11 |
+
|
| 12 |
+
[package]
|
| 13 |
+
name = "alloc-stdlib"
|
| 14 |
+
version = "0.2.2"
|
| 15 |
+
authors = ["Daniel Reiter Horn <danielrh@dropbox.com>"]
|
| 16 |
+
autobins = false
|
| 17 |
+
description = "A dynamic allocator example that may be used with the stdlib"
|
| 18 |
+
homepage = "https://github.com/dropbox/rust-alloc-no-stdlib"
|
| 19 |
+
documentation = "https://raw.githubusercontent.com/dropbox/rust-alloc-no-stdlib/master/alloc-stdlib/tests/lib.rs"
|
| 20 |
+
readme = "README.md"
|
| 21 |
+
keywords = [
|
| 22 |
+
"custom",
|
| 23 |
+
"allocator",
|
| 24 |
+
"calloc",
|
| 25 |
+
"safe",
|
| 26 |
+
"nostd",
|
| 27 |
+
]
|
| 28 |
+
license = "BSD-3-Clause"
|
| 29 |
+
repository = "https://github.com/dropbox/rust-alloc-no-stdlib"
|
| 30 |
+
|
| 31 |
+
[[bin]]
|
| 32 |
+
name = "example"
|
| 33 |
+
|
| 34 |
+
[dependencies.alloc-no-stdlib]
|
| 35 |
+
version = "2.0.4"
|
| 36 |
+
|
| 37 |
+
[features]
|
| 38 |
+
unsafe = []
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-stdlib-0.2.2/Cargo.toml.orig
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[package]
|
| 2 |
+
name = "alloc-stdlib"
|
| 3 |
+
description = "A dynamic allocator example that may be used with the stdlib"
|
| 4 |
+
version = "0.2.2"
|
| 5 |
+
authors = ["Daniel Reiter Horn <danielrh@dropbox.com>"]
|
| 6 |
+
documentation = "https://raw.githubusercontent.com/dropbox/rust-alloc-no-stdlib/master/alloc-stdlib/tests/lib.rs"
|
| 7 |
+
homepage = "https://github.com/dropbox/rust-alloc-no-stdlib"
|
| 8 |
+
readme = "README.md"
|
| 9 |
+
keywords = ["custom", "allocator", "calloc", "safe", "nostd"]
|
| 10 |
+
license = "BSD-3-Clause"
|
| 11 |
+
repository = "https://github.com/dropbox/rust-alloc-no-stdlib"
|
| 12 |
+
autobins = false
|
| 13 |
+
|
| 14 |
+
[[bin]]
|
| 15 |
+
name = "example"
|
| 16 |
+
|
| 17 |
+
[dependencies]
|
| 18 |
+
"alloc-no-stdlib" = { version="2.0.4", path="../"}
|
| 19 |
+
|
| 20 |
+
[features]
|
| 21 |
+
unsafe = []
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloc-stdlib-0.2.2/README.md
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Framework for allocating memory in #![no_std] modules.
|
| 2 |
+
|
| 3 |
+
[](https://crates.io/crates/alloc-no-stdlib)
|
| 4 |
+
[](https://travis-ci.org/dropbox/rust-alloc-no-stdlib)
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
## Requirements
|
| 8 |
+
* Rust 1.6
|
| 9 |
+
|
| 10 |
+
## Documentation
|
| 11 |
+
Currently there is no standard way to allocate memory from within a module that is no_std.
|
| 12 |
+
This provides a mechanism to allocate memory using the stdlib-independent
|
| 13 |
+
memory allocation system described by rust-alloc-no-stdlib
|
| 14 |
+
describe a memory allocation that can be satisfied entirely on
|
| 15 |
+
the stack, by unsafely linking to calloc, or by unsafely referencing a mutable global variable.
|
| 16 |
+
This library currently will leak memory if free_cell isn't specifically invoked on memory.
|
| 17 |
+
|
| 18 |
+
However, if linked by a library that actually can depend on the stdlib then that library
|
| 19 |
+
can simply pass in a few allocators and use the standard Box allocation and will free automatically.
|
| 20 |
+
|
| 21 |
+
This library should also make it possible to entirely jail a rust application that needs dynamic
|
| 22 |
+
allocations by preallocating a maximum limit of data upfront using calloc and
|
| 23 |
+
using seccomp to disallow future syscalls.
|
| 24 |
+
|
| 25 |
+
## Usage
|
| 26 |
+
|
| 27 |
+
There are 3 modes for allocating memory using the stdlib, each with advantages and disadvantages
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
### On the heap
|
| 31 |
+
This uses the standard Box facilities to allocate memory and assumeds a default constructor
|
| 32 |
+
for the given type
|
| 33 |
+
|
| 34 |
+
```rust
|
| 35 |
+
let mut halloc = StandardAlloc::new(0);
|
| 36 |
+
for _i in 1..10 { // heap test
|
| 37 |
+
let mut x = <StandardAlloc as Allocator<u8>>::alloc_cell(&mut halloc, 100000)
|
| 38 |
+
x[0] = 4;
|
| 39 |
+
let mut y = <StandardAlloc as Allocator<u8>>::alloc_cell(&mut halloc, 100000)
|
| 40 |
+
y[0] = 5;
|
| 41 |
+
let mut z = <StandardAlloc as Allocator<u8>>::alloc_cell(&mut halloc, 100000)
|
| 42 |
+
z[0] = 6;
|
| 43 |
+
assert_eq!(y[0], 5);
|
| 44 |
+
halloc.free_cell(y);
|
| 45 |
+
assert_eq!(x[0], 4);
|
| 46 |
+
assert_eq!(x[9], 0);
|
| 47 |
+
assert_eq!(z[0], 6);
|
| 48 |
+
}
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
### On the heap
|
| 52 |
+
This uses the standard Box facilities to allocate memory but assuming a default user-provided value
|
| 53 |
+
|
| 54 |
+
```rust
|
| 55 |
+
let mut halloc = HeapAlloc::<u8>::new(8);
|
| 56 |
+
for _i in 1..10 { // heap test
|
| 57 |
+
let mut x = halloc.alloc_cell(100000);
|
| 58 |
+
x[0] = 4;
|
| 59 |
+
let mut y = halloc.alloc_cell(110000);
|
| 60 |
+
y[0] = 5;
|
| 61 |
+
let mut z = halloc.alloc_cell(120000);
|
| 62 |
+
z[0] = 6;
|
| 63 |
+
assert_eq!(y[0], 5);
|
| 64 |
+
halloc.free_cell(y);
|
| 65 |
+
assert_eq!(x[0], 4);
|
| 66 |
+
assert_eq!(x[9], 8);
|
| 67 |
+
assert_eq!(z[0], 6);
|
| 68 |
+
}
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
### On the heap, but uninitialized
|
| 73 |
+
This does allocate data every time it is requested, but it does not allocate the
|
| 74 |
+
memory, so naturally it is unsafe. The caller must initialize the memory properly
|
| 75 |
+
```rust
|
| 76 |
+
let mut halloc = unsafe{HeapAllocUninitialized::<u8>::new()};
|
| 77 |
+
{ // heap test
|
| 78 |
+
let mut x = halloc.alloc_cell(100000);
|
| 79 |
+
x[0] = 4;
|
| 80 |
+
let mut y = halloc.alloc_cell(110000);
|
| 81 |
+
y[0] = 5;
|
| 82 |
+
let mut z = halloc.alloc_cell(120000);
|
| 83 |
+
z[0] = 6;
|
| 84 |
+
assert_eq!(y[0], 5);
|
| 85 |
+
halloc.free_cell(y);
|
| 86 |
+
assert_eq!(x[0], 4);
|
| 87 |
+
assert_eq!(x[9], 0);
|
| 88 |
+
assert_eq!(z[0], 6);
|
| 89 |
+
...
|
| 90 |
+
}
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
### On the heap in a single pool allocation
|
| 95 |
+
This does a single big allocation on the heap, after which no further usage of the stdlib
|
| 96 |
+
will happen. This can be useful for a jailed application that wishes to restrict syscalls
|
| 97 |
+
at this point
|
| 98 |
+
|
| 99 |
+
```rust
|
| 100 |
+
use alloc_no_stdlib::HeapPrealloc;
|
| 101 |
+
...
|
| 102 |
+
let mut heap_global_buffer = define_allocator_memory_pool!(4096, u8, [0; 6 * 1024 * 1024], heap);
|
| 103 |
+
let mut ags = HeapPrealloc::<u8>::new_allocator(4096, &mut heap_global_buffer, uninitialized);
|
| 104 |
+
{
|
| 105 |
+
let mut x = ags.alloc_cell(9999);
|
| 106 |
+
x.slice_mut()[0] = 4;
|
| 107 |
+
let mut y = ags.alloc_cell(4);
|
| 108 |
+
y[0] = 5;
|
| 109 |
+
ags.free_cell(y);
|
| 110 |
+
|
| 111 |
+
//y.mem[0] = 6; // <-- this is an error (use after free)
|
| 112 |
+
}
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
### On the heap, uninitialized
|
| 118 |
+
This does a single big allocation on the heap, after which no further usage of the stdlib
|
| 119 |
+
will happen. This can be useful for a jailed application that wishes to restrict syscalls
|
| 120 |
+
at this point. This option keep does not set the memory to a valid value, so it is
|
| 121 |
+
necessarily marked unsafe
|
| 122 |
+
|
| 123 |
+
```rust
|
| 124 |
+
use alloc_no_stdlib::HeapPrealloc;
|
| 125 |
+
...
|
| 126 |
+
let mut heap_global_buffer = unsafe{HeapPrealloc::<u8>::new_uninitialized_memory_pool(6 * 1024 * 1024)};
|
| 127 |
+
let mut ags = HeapPrealloc::<u8>::new_allocator(4096, &mut heap_global_buffer, uninitialized);
|
| 128 |
+
{
|
| 129 |
+
let mut x = ags.alloc_cell(9999);
|
| 130 |
+
x.slice_mut()[0] = 4;
|
| 131 |
+
let mut y = ags.alloc_cell(4);
|
| 132 |
+
y[0] = 5;
|
| 133 |
+
ags.free_cell(y);
|
| 134 |
+
|
| 135 |
+
//y.mem[0] = 6; // <-- this is an error (use after free)
|
| 136 |
+
}
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
### With calloc
|
| 140 |
+
This is the most efficient way to get a zero'd dynamically sized buffer without the stdlib
|
| 141 |
+
It does invoke the C calloc function and hence must invoke unsafe code.
|
| 142 |
+
In this version, the number of cells are fixed to the parameter specified in the struct definition
|
| 143 |
+
(4096 in this example)
|
| 144 |
+
|
| 145 |
+
```rust
|
| 146 |
+
extern {
|
| 147 |
+
fn calloc(n_elem : usize, el_size : usize) -> *mut u8;
|
| 148 |
+
fn malloc(len : usize) -> *mut u8;
|
| 149 |
+
fn free(item : *mut u8);
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
declare_stack_allocator_struct!(CallocAllocatedFreelist4096, 4096, calloc);
|
| 153 |
+
...
|
| 154 |
+
|
| 155 |
+
// the buffer is defined with 200 megs of zero'd memory from calloc
|
| 156 |
+
let mut calloc_global_buffer = unsafe {define_allocator_memory_pool!(4096, u8, [0; 200 * 1024 * 1024], calloc)};
|
| 157 |
+
// and assigned to a new_allocator
|
| 158 |
+
let mut ags = CallocAllocatedFreelist4096::<u8>::new_allocator(&mut calloc_global_buffer.data, bzero);
|
| 159 |
+
{
|
| 160 |
+
let mut x = ags.alloc_cell(9999);
|
| 161 |
+
x.slice_mut()[0] = 4;
|
| 162 |
+
let mut y = ags.alloc_cell(4);
|
| 163 |
+
y[0] = 5;
|
| 164 |
+
ags.free_cell(y);
|
| 165 |
+
//y.mem[0] = 6; // <-- this is an error (use after free)
|
| 166 |
+
}
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
### With a static, mutable buffer
|
| 170 |
+
If a single buffer of data is needed for the entire span of the application
|
| 171 |
+
Then the simplest way to do so without a zero operation on
|
| 172 |
+
the memory and without using the stdlib is to simply have a global allocated
|
| 173 |
+
structure. Accessing mutable static variables requires unsafe code; however,
|
| 174 |
+
so this code will invoke an unsafe block.
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
Make sure to only reference global_buffer in a single place, at a single time in the code
|
| 178 |
+
If it is used from two places or at different times, undefined behavior may result,
|
| 179 |
+
since multiple allocators may get access to global_buffer.
|
| 180 |
+
|
| 181 |
+
|
| 182 |
+
```rust
|
| 183 |
+
declare_stack_allocator_struct!(GlobalAllocatedFreelist, 16, global);
|
| 184 |
+
define_allocator_memory_pool!(16, u8, [0; 1024 * 1024 * 100], global, global_buffer);
|
| 185 |
+
|
| 186 |
+
...
|
| 187 |
+
// this references a global buffer
|
| 188 |
+
let mut ags = GlobalAllocatedFreelist::<u8>::new_allocator(bzero);
|
| 189 |
+
unsafe {
|
| 190 |
+
bind_global_buffers_to_allocator!(ags, global_buffer, u8);
|
| 191 |
+
}
|
| 192 |
+
{
|
| 193 |
+
let mut x = ags.alloc_cell(9999);
|
| 194 |
+
x.slice_mut()[0] = 4;
|
| 195 |
+
let mut y = ags.alloc_cell(4);
|
| 196 |
+
y[0] = 5;
|
| 197 |
+
ags.free_cell(y);
|
| 198 |
+
|
| 199 |
+
//y.mem[0] = 6; // <-- this is an error (use after free)
|
| 200 |
+
}
|
| 201 |
+
```
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
## Contributors
|
| 205 |
+
- Daniel Reiter Horn
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/.cargo-ok
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"v":1}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/.cargo_vcs_info.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"git": {
|
| 3 |
+
"sha1": "368a8719474357f9d54be800b4163c9074561e37"
|
| 4 |
+
},
|
| 5 |
+
"path_in_vcs": "crates/anstyle-wincon"
|
| 6 |
+
}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/Cargo.lock
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is automatically @generated by Cargo.
|
| 2 |
+
# It is not intended for manual editing.
|
| 3 |
+
version = 3
|
| 4 |
+
|
| 5 |
+
[[package]]
|
| 6 |
+
name = "anstyle"
|
| 7 |
+
version = "1.0.13"
|
| 8 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 9 |
+
checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
|
| 10 |
+
|
| 11 |
+
[[package]]
|
| 12 |
+
name = "anstyle-wincon"
|
| 13 |
+
version = "3.0.11"
|
| 14 |
+
dependencies = [
|
| 15 |
+
"anstyle",
|
| 16 |
+
"lexopt",
|
| 17 |
+
"once_cell_polyfill",
|
| 18 |
+
"windows-sys",
|
| 19 |
+
]
|
| 20 |
+
|
| 21 |
+
[[package]]
|
| 22 |
+
name = "lexopt"
|
| 23 |
+
version = "0.3.1"
|
| 24 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 25 |
+
checksum = "9fa0e2a1fcbe2f6be6c42e342259976206b383122fc152e872795338b5a3f3a7"
|
| 26 |
+
|
| 27 |
+
[[package]]
|
| 28 |
+
name = "once_cell"
|
| 29 |
+
version = "1.21.3"
|
| 30 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 31 |
+
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
| 32 |
+
|
| 33 |
+
[[package]]
|
| 34 |
+
name = "once_cell_polyfill"
|
| 35 |
+
version = "1.56.1"
|
| 36 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 37 |
+
checksum = "8aab899efe6ce4fe821f6dda30c02d7041c79f147598ab4b60197f181e12d001"
|
| 38 |
+
dependencies = [
|
| 39 |
+
"once_cell",
|
| 40 |
+
]
|
| 41 |
+
|
| 42 |
+
[[package]]
|
| 43 |
+
name = "windows-link"
|
| 44 |
+
version = "0.2.1"
|
| 45 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 46 |
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
| 47 |
+
|
| 48 |
+
[[package]]
|
| 49 |
+
name = "windows-sys"
|
| 50 |
+
version = "0.60.2"
|
| 51 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 52 |
+
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
|
| 53 |
+
dependencies = [
|
| 54 |
+
"windows-targets",
|
| 55 |
+
]
|
| 56 |
+
|
| 57 |
+
[[package]]
|
| 58 |
+
name = "windows-targets"
|
| 59 |
+
version = "0.53.5"
|
| 60 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 61 |
+
checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
|
| 62 |
+
dependencies = [
|
| 63 |
+
"windows-link",
|
| 64 |
+
"windows_aarch64_gnullvm",
|
| 65 |
+
"windows_aarch64_msvc",
|
| 66 |
+
"windows_i686_gnu",
|
| 67 |
+
"windows_i686_gnullvm",
|
| 68 |
+
"windows_i686_msvc",
|
| 69 |
+
"windows_x86_64_gnu",
|
| 70 |
+
"windows_x86_64_gnullvm",
|
| 71 |
+
"windows_x86_64_msvc",
|
| 72 |
+
]
|
| 73 |
+
|
| 74 |
+
[[package]]
|
| 75 |
+
name = "windows_aarch64_gnullvm"
|
| 76 |
+
version = "0.53.1"
|
| 77 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 78 |
+
checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
|
| 79 |
+
|
| 80 |
+
[[package]]
|
| 81 |
+
name = "windows_aarch64_msvc"
|
| 82 |
+
version = "0.53.1"
|
| 83 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 84 |
+
checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
|
| 85 |
+
|
| 86 |
+
[[package]]
|
| 87 |
+
name = "windows_i686_gnu"
|
| 88 |
+
version = "0.53.1"
|
| 89 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 90 |
+
checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
|
| 91 |
+
|
| 92 |
+
[[package]]
|
| 93 |
+
name = "windows_i686_gnullvm"
|
| 94 |
+
version = "0.53.1"
|
| 95 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 96 |
+
checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
|
| 97 |
+
|
| 98 |
+
[[package]]
|
| 99 |
+
name = "windows_i686_msvc"
|
| 100 |
+
version = "0.53.1"
|
| 101 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 102 |
+
checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
|
| 103 |
+
|
| 104 |
+
[[package]]
|
| 105 |
+
name = "windows_x86_64_gnu"
|
| 106 |
+
version = "0.53.1"
|
| 107 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 108 |
+
checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
|
| 109 |
+
|
| 110 |
+
[[package]]
|
| 111 |
+
name = "windows_x86_64_gnullvm"
|
| 112 |
+
version = "0.53.1"
|
| 113 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 114 |
+
checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
|
| 115 |
+
|
| 116 |
+
[[package]]
|
| 117 |
+
name = "windows_x86_64_msvc"
|
| 118 |
+
version = "0.53.1"
|
| 119 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 120 |
+
checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/Cargo.toml
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
| 2 |
+
#
|
| 3 |
+
# When uploading crates to the registry Cargo will automatically
|
| 4 |
+
# "normalize" Cargo.toml files for maximal compatibility
|
| 5 |
+
# with all versions of Cargo and also rewrite `path` dependencies
|
| 6 |
+
# to registry (e.g., crates.io) dependencies.
|
| 7 |
+
#
|
| 8 |
+
# If you are reading this file be aware that the original Cargo.toml
|
| 9 |
+
# will likely look very different (and much more reasonable).
|
| 10 |
+
# See Cargo.toml.orig for the original contents.
|
| 11 |
+
|
| 12 |
+
[package]
|
| 13 |
+
edition = "2021"
|
| 14 |
+
rust-version = "1.66.0"
|
| 15 |
+
name = "anstyle-wincon"
|
| 16 |
+
version = "3.0.11"
|
| 17 |
+
build = false
|
| 18 |
+
include = [
|
| 19 |
+
"build.rs",
|
| 20 |
+
"src/**/*",
|
| 21 |
+
"Cargo.toml",
|
| 22 |
+
"Cargo.lock",
|
| 23 |
+
"LICENSE*",
|
| 24 |
+
"README.md",
|
| 25 |
+
"examples/**/*",
|
| 26 |
+
]
|
| 27 |
+
autolib = false
|
| 28 |
+
autobins = false
|
| 29 |
+
autoexamples = false
|
| 30 |
+
autotests = false
|
| 31 |
+
autobenches = false
|
| 32 |
+
description = "Styling legacy Windows terminals"
|
| 33 |
+
readme = "README.md"
|
| 34 |
+
keywords = [
|
| 35 |
+
"ansi",
|
| 36 |
+
"terminal",
|
| 37 |
+
"color",
|
| 38 |
+
"windows",
|
| 39 |
+
]
|
| 40 |
+
categories = ["command-line-interface"]
|
| 41 |
+
license = "MIT OR Apache-2.0"
|
| 42 |
+
repository = "https://github.com/rust-cli/anstyle.git"
|
| 43 |
+
|
| 44 |
+
[package.metadata.docs.rs]
|
| 45 |
+
all-features = true
|
| 46 |
+
rustdoc-args = [
|
| 47 |
+
"--cfg",
|
| 48 |
+
"docsrs",
|
| 49 |
+
"--generate-link-to-definition",
|
| 50 |
+
]
|
| 51 |
+
targets = ["x86_64-pc-windows-msvc"]
|
| 52 |
+
|
| 53 |
+
[[package.metadata.release.pre-release-replacements]]
|
| 54 |
+
file = "CHANGELOG.md"
|
| 55 |
+
search = "Unreleased"
|
| 56 |
+
replace = "{{version}}"
|
| 57 |
+
min = 1
|
| 58 |
+
|
| 59 |
+
[[package.metadata.release.pre-release-replacements]]
|
| 60 |
+
file = "CHANGELOG.md"
|
| 61 |
+
search = '\.\.\.HEAD'
|
| 62 |
+
replace = "...{{tag_name}}"
|
| 63 |
+
exactly = 1
|
| 64 |
+
|
| 65 |
+
[[package.metadata.release.pre-release-replacements]]
|
| 66 |
+
file = "CHANGELOG.md"
|
| 67 |
+
search = "ReleaseDate"
|
| 68 |
+
replace = "{{date}}"
|
| 69 |
+
min = 1
|
| 70 |
+
|
| 71 |
+
[[package.metadata.release.pre-release-replacements]]
|
| 72 |
+
file = "CHANGELOG.md"
|
| 73 |
+
search = "<!-- next-header -->"
|
| 74 |
+
replace = """
|
| 75 |
+
<!-- next-header -->
|
| 76 |
+
## [Unreleased] - ReleaseDate
|
| 77 |
+
"""
|
| 78 |
+
exactly = 1
|
| 79 |
+
|
| 80 |
+
[[package.metadata.release.pre-release-replacements]]
|
| 81 |
+
file = "CHANGELOG.md"
|
| 82 |
+
search = "<!-- next-url -->"
|
| 83 |
+
replace = """
|
| 84 |
+
<!-- next-url -->
|
| 85 |
+
[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD"""
|
| 86 |
+
exactly = 1
|
| 87 |
+
|
| 88 |
+
[lib]
|
| 89 |
+
name = "anstyle_wincon"
|
| 90 |
+
path = "src/lib.rs"
|
| 91 |
+
|
| 92 |
+
[[example]]
|
| 93 |
+
name = "dump-wincon"
|
| 94 |
+
path = "examples/dump-wincon.rs"
|
| 95 |
+
|
| 96 |
+
[[example]]
|
| 97 |
+
name = "set-wincon"
|
| 98 |
+
path = "examples/set-wincon.rs"
|
| 99 |
+
|
| 100 |
+
[dependencies.anstyle]
|
| 101 |
+
version = "1.0.0"
|
| 102 |
+
|
| 103 |
+
[dev-dependencies.lexopt]
|
| 104 |
+
version = "0.3.1"
|
| 105 |
+
|
| 106 |
+
[target."cfg(windows)".dependencies.once_cell_polyfill]
|
| 107 |
+
version = "1.56.1"
|
| 108 |
+
|
| 109 |
+
[target."cfg(windows)".dependencies.windows-sys]
|
| 110 |
+
version = ">=0.60.2, <0.62"
|
| 111 |
+
features = [
|
| 112 |
+
"Win32_System_Console",
|
| 113 |
+
"Win32_Foundation",
|
| 114 |
+
]
|
| 115 |
+
|
| 116 |
+
[lints.clippy]
|
| 117 |
+
bool_assert_comparison = "allow"
|
| 118 |
+
branches_sharing_code = "allow"
|
| 119 |
+
checked_conversions = "warn"
|
| 120 |
+
collapsible_else_if = "allow"
|
| 121 |
+
create_dir = "warn"
|
| 122 |
+
dbg_macro = "warn"
|
| 123 |
+
debug_assert_with_mut_call = "warn"
|
| 124 |
+
doc_markdown = "warn"
|
| 125 |
+
empty_enum = "warn"
|
| 126 |
+
enum_glob_use = "warn"
|
| 127 |
+
expl_impl_clone_on_copy = "warn"
|
| 128 |
+
explicit_deref_methods = "warn"
|
| 129 |
+
explicit_into_iter_loop = "warn"
|
| 130 |
+
fallible_impl_from = "warn"
|
| 131 |
+
filter_map_next = "warn"
|
| 132 |
+
flat_map_option = "warn"
|
| 133 |
+
float_cmp_const = "warn"
|
| 134 |
+
fn_params_excessive_bools = "warn"
|
| 135 |
+
from_iter_instead_of_collect = "warn"
|
| 136 |
+
if_same_then_else = "allow"
|
| 137 |
+
implicit_clone = "warn"
|
| 138 |
+
imprecise_flops = "warn"
|
| 139 |
+
inconsistent_struct_constructor = "warn"
|
| 140 |
+
inefficient_to_string = "warn"
|
| 141 |
+
infinite_loop = "warn"
|
| 142 |
+
invalid_upcast_comparisons = "warn"
|
| 143 |
+
large_digit_groups = "warn"
|
| 144 |
+
large_stack_arrays = "warn"
|
| 145 |
+
large_types_passed_by_value = "warn"
|
| 146 |
+
let_and_return = "allow"
|
| 147 |
+
linkedlist = "warn"
|
| 148 |
+
lossy_float_literal = "warn"
|
| 149 |
+
macro_use_imports = "warn"
|
| 150 |
+
mem_forget = "warn"
|
| 151 |
+
mutex_integer = "warn"
|
| 152 |
+
needless_continue = "allow"
|
| 153 |
+
needless_for_each = "warn"
|
| 154 |
+
negative_feature_names = "warn"
|
| 155 |
+
path_buf_push_overwrite = "warn"
|
| 156 |
+
ptr_as_ptr = "warn"
|
| 157 |
+
rc_mutex = "warn"
|
| 158 |
+
redundant_feature_names = "warn"
|
| 159 |
+
ref_option_ref = "warn"
|
| 160 |
+
rest_pat_in_fully_bound_structs = "warn"
|
| 161 |
+
result_large_err = "allow"
|
| 162 |
+
same_functions_in_if_condition = "warn"
|
| 163 |
+
self_named_module_files = "warn"
|
| 164 |
+
semicolon_if_nothing_returned = "warn"
|
| 165 |
+
str_to_string = "warn"
|
| 166 |
+
string_add = "warn"
|
| 167 |
+
string_add_assign = "warn"
|
| 168 |
+
string_lit_as_bytes = "warn"
|
| 169 |
+
todo = "warn"
|
| 170 |
+
trait_duplication_in_bounds = "warn"
|
| 171 |
+
uninlined_format_args = "warn"
|
| 172 |
+
verbose_file_reads = "warn"
|
| 173 |
+
wildcard_imports = "warn"
|
| 174 |
+
zero_sized_map_values = "warn"
|
| 175 |
+
|
| 176 |
+
[lints.rust]
|
| 177 |
+
unnameable_types = "warn"
|
| 178 |
+
unreachable_pub = "warn"
|
| 179 |
+
unsafe_op_in_unsafe_fn = "warn"
|
| 180 |
+
unused_lifetimes = "warn"
|
| 181 |
+
unused_macro_rules = "warn"
|
| 182 |
+
unused_qualifications = "warn"
|
| 183 |
+
|
| 184 |
+
[lints.rust.rust_2018_idioms]
|
| 185 |
+
level = "warn"
|
| 186 |
+
priority = -1
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/Cargo.toml.orig
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[package]
|
| 2 |
+
name = "anstyle-wincon"
|
| 3 |
+
version = "3.0.11"
|
| 4 |
+
description = "Styling legacy Windows terminals"
|
| 5 |
+
categories = ["command-line-interface"]
|
| 6 |
+
keywords = ["ansi", "terminal", "color", "windows"]
|
| 7 |
+
repository.workspace = true
|
| 8 |
+
license.workspace = true
|
| 9 |
+
edition.workspace = true
|
| 10 |
+
rust-version.workspace = true
|
| 11 |
+
include.workspace = true
|
| 12 |
+
|
| 13 |
+
[package.metadata.docs.rs]
|
| 14 |
+
all-features = true
|
| 15 |
+
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
|
| 16 |
+
targets = ["x86_64-pc-windows-msvc"]
|
| 17 |
+
|
| 18 |
+
[package.metadata.release]
|
| 19 |
+
pre-release-replacements = [
|
| 20 |
+
{file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1},
|
| 21 |
+
{file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1},
|
| 22 |
+
{file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1},
|
| 23 |
+
{file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1},
|
| 24 |
+
{file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1},
|
| 25 |
+
]
|
| 26 |
+
|
| 27 |
+
[dependencies]
|
| 28 |
+
anstyle = { version = "1.0.0", path = "../anstyle" }
|
| 29 |
+
|
| 30 |
+
[dev-dependencies]
|
| 31 |
+
lexopt = "0.3.1"
|
| 32 |
+
|
| 33 |
+
[target.'cfg(windows)'.dependencies]
|
| 34 |
+
windows-sys = { version = ">=0.60.2, <0.62", features = ["Win32_System_Console", "Win32_Foundation"] }
|
| 35 |
+
once_cell_polyfill = "1.56.1"
|
| 36 |
+
|
| 37 |
+
[lints]
|
| 38 |
+
workspace = true
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/LICENSE-APACHE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright {yyyy} {name of copyright owner}
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|
| 202 |
+
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/LICENSE-MIT
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) Individual contributors
|
| 2 |
+
|
| 3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 4 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 5 |
+
in the Software without restriction, including without limitation the rights
|
| 6 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 7 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 8 |
+
furnished to do so, subject to the following conditions:
|
| 9 |
+
|
| 10 |
+
The above copyright notice and this permission notice shall be included in all
|
| 11 |
+
copies or substantial portions of the Software.
|
| 12 |
+
|
| 13 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 14 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 15 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 16 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 17 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 18 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 19 |
+
SOFTWARE.
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anstyle-wincon-3.0.11/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# anstyle-wincon
|
| 2 |
+
|
| 3 |
+
> Styling legacy Windows terminals
|
| 4 |
+
|
| 5 |
+
[][Documentation]
|
| 6 |
+

|
| 7 |
+
[](https://crates.io/crates/anstyle-wincon)
|
| 8 |
+
|
| 9 |
+
## License
|
| 10 |
+
|
| 11 |
+
Licensed under either of
|
| 12 |
+
|
| 13 |
+
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <https://www.apache.org/licenses/LICENSE-2.0>)
|
| 14 |
+
* MIT license ([LICENSE-MIT](LICENSE-MIT) or <https://opensource.org/license/mit>)
|
| 15 |
+
|
| 16 |
+
at your option.
|
| 17 |
+
|
| 18 |
+
## [Contribute](../../CONTRIBUTING.md)
|
| 19 |
+
|
| 20 |
+
Unless you explicitly state otherwise, any contribution intentionally
|
| 21 |
+
submitted for inclusion in the work by you, as defined in the Apache-2.0
|
| 22 |
+
license, shall be dual-licensed as above, without any additional terms or
|
| 23 |
+
conditions.
|
| 24 |
+
|
| 25 |
+
### Special Thanks
|
| 26 |
+
|
| 27 |
+
[burntsushi](https://github.com/burntsushi) for [termcolor](https://github.com/burntsushi/termcolor) as I don't know Windows either :)
|
| 28 |
+
|
| 29 |
+
[Crates.io]: https://crates.io/crates/anstyle-wincon
|
| 30 |
+
[Documentation]: https://docs.rs/anstyle-wincon
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/.cargo-ok
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"v":1}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/.cargo_vcs_info.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"git": {
|
| 3 |
+
"sha1": "8605175df3a9bd1c5e36a300fa68eb5b4a181e6f"
|
| 4 |
+
},
|
| 5 |
+
"path_in_vcs": ""
|
| 6 |
+
}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/target
|
| 2 |
+
/Cargo.lock
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/Cargo.toml
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
| 2 |
+
#
|
| 3 |
+
# When uploading crates to the registry Cargo will automatically
|
| 4 |
+
# "normalize" Cargo.toml files for maximal compatibility
|
| 5 |
+
# with all versions of Cargo and also rewrite `path` dependencies
|
| 6 |
+
# to registry (e.g., crates.io) dependencies.
|
| 7 |
+
#
|
| 8 |
+
# If you are reading this file be aware that the original Cargo.toml
|
| 9 |
+
# will likely look very different (and much more reasonable).
|
| 10 |
+
# See Cargo.toml.orig for the original contents.
|
| 11 |
+
|
| 12 |
+
[package]
|
| 13 |
+
name = "ascii"
|
| 14 |
+
version = "1.1.0"
|
| 15 |
+
authors = [
|
| 16 |
+
"Thomas Bahn <thomas@thomas-bahn.net>",
|
| 17 |
+
"Torbjørn Birch Moltu <t.b.moltu@lyse.net>",
|
| 18 |
+
"Simon Sapin <simon.sapin@exyr.org>",
|
| 19 |
+
]
|
| 20 |
+
description = "ASCII-only equivalents to `char`, `str` and `String`."
|
| 21 |
+
documentation = "https://docs.rs/ascii"
|
| 22 |
+
readme = "README.md"
|
| 23 |
+
license = "Apache-2.0 OR MIT"
|
| 24 |
+
repository = "https://github.com/tomprogrammer/rust-ascii"
|
| 25 |
+
|
| 26 |
+
[[test]]
|
| 27 |
+
name = "tests"
|
| 28 |
+
path = "tests.rs"
|
| 29 |
+
|
| 30 |
+
[dependencies.serde]
|
| 31 |
+
version = "1.0.25"
|
| 32 |
+
optional = true
|
| 33 |
+
|
| 34 |
+
[dependencies.serde_test]
|
| 35 |
+
version = "1.0"
|
| 36 |
+
optional = true
|
| 37 |
+
|
| 38 |
+
[features]
|
| 39 |
+
alloc = []
|
| 40 |
+
default = ["std"]
|
| 41 |
+
std = ["alloc"]
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/Cargo.toml.orig
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[package]
|
| 2 |
+
authors = ["Thomas Bahn <thomas@thomas-bahn.net>", "Torbjørn Birch Moltu <t.b.moltu@lyse.net>", "Simon Sapin <simon.sapin@exyr.org>"]
|
| 3 |
+
description = "ASCII-only equivalents to `char`, `str` and `String`."
|
| 4 |
+
documentation = "https://docs.rs/ascii"
|
| 5 |
+
license = "Apache-2.0 OR MIT"
|
| 6 |
+
name = "ascii"
|
| 7 |
+
readme = "README.md"
|
| 8 |
+
repository = "https://github.com/tomprogrammer/rust-ascii"
|
| 9 |
+
version = "1.1.0"
|
| 10 |
+
|
| 11 |
+
[dependencies]
|
| 12 |
+
serde = { version = "1.0.25", optional = true }
|
| 13 |
+
serde_test = { version = "1.0", optional = true }
|
| 14 |
+
|
| 15 |
+
[features]
|
| 16 |
+
default = ["std"]
|
| 17 |
+
std = ["alloc"]
|
| 18 |
+
alloc = []
|
| 19 |
+
|
| 20 |
+
[[test]]
|
| 21 |
+
name = "tests"
|
| 22 |
+
path = "tests.rs"
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/LICENSE-APACHE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright [yyyy] [name of copyright owner]
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/LICENSE-MIT
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2017 Thomas Bahn and contributors
|
| 4 |
+
Copyright (c) 2014 The Rust Project Developers
|
| 5 |
+
|
| 6 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 7 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 8 |
+
in the Software without restriction, including without limitation the rights
|
| 9 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 10 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 11 |
+
furnished to do so, subject to the following conditions:
|
| 12 |
+
|
| 13 |
+
The above copyright notice and this permission notice shall be included in all
|
| 14 |
+
copies or substantial portions of the Software.
|
| 15 |
+
|
| 16 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 17 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 18 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 19 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 20 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 21 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 22 |
+
SOFTWARE.
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ascii
|
| 2 |
+
|
| 3 |
+
A library that provides ASCII-only string and character types, equivalent to the
|
| 4 |
+
`char`, `str` and `String` types in the standard library.
|
| 5 |
+
|
| 6 |
+
Types and conversion traits are described in the [Documentation](https://docs.rs/ascii).
|
| 7 |
+
|
| 8 |
+
You can include this crate in your cargo project by adding it to the
|
| 9 |
+
dependencies section in `Cargo.toml`:
|
| 10 |
+
|
| 11 |
+
```toml
|
| 12 |
+
[dependencies]
|
| 13 |
+
ascii = "1.1"
|
| 14 |
+
```
|
| 15 |
+
|
| 16 |
+
## Using ascii without libstd
|
| 17 |
+
|
| 18 |
+
Most of `AsciiChar` and `AsciiStr` can be used without `std` by disabling the
|
| 19 |
+
default features. The owned string type `AsciiString` and the conversion trait
|
| 20 |
+
`IntoAsciiString` as well as all methods referring to these types can be
|
| 21 |
+
re-enabled by enabling the `alloc` feature.
|
| 22 |
+
|
| 23 |
+
Methods referring to `CStr` and `CString` are also unavailable.
|
| 24 |
+
The `Error` trait also only exists in `std`, but `description()` is made
|
| 25 |
+
available as an inherent method for `ToAsciiCharError` and `AsAsciiStrError`
|
| 26 |
+
in `#![no_std]`-mode.
|
| 27 |
+
|
| 28 |
+
To use the `ascii` crate in `#![no_std]` mode in your cargo project,
|
| 29 |
+
just add the following dependency declaration in `Cargo.toml`:
|
| 30 |
+
|
| 31 |
+
```toml
|
| 32 |
+
[dependencies]
|
| 33 |
+
ascii = { version = "1.1", default-features = false, features = ["alloc"] }
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
## Minimum supported Rust version
|
| 37 |
+
|
| 38 |
+
The minimum Rust version for 1.1.\* releases is 1.41.1.
|
| 39 |
+
Later 1.y.0 releases might require newer Rust versions, but the three most
|
| 40 |
+
recent stable releases at the time of publishing will always be supported.
|
| 41 |
+
For example this means that if the current stable Rust version is 1.70 when
|
| 42 |
+
ascii 1.2.0 is released, then ascii 1.2.\* will not require a newer
|
| 43 |
+
Rust version than 1.68.
|
| 44 |
+
|
| 45 |
+
## History
|
| 46 |
+
|
| 47 |
+
This package included the Ascii types that were removed from the Rust standard
|
| 48 |
+
library by the 2014-12 [reform of the `std::ascii` module](https://github.com/rust-lang/rfcs/pull/486).
|
| 49 |
+
The API changed significantly since then.
|
| 50 |
+
|
| 51 |
+
## License
|
| 52 |
+
|
| 53 |
+
Licensed under either of
|
| 54 |
+
|
| 55 |
+
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
| 56 |
+
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
| 57 |
+
|
| 58 |
+
at your option.
|
| 59 |
+
|
| 60 |
+
### Contribution
|
| 61 |
+
|
| 62 |
+
Unless you explicitly state otherwise, any contribution intentionally submitted
|
| 63 |
+
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
|
| 64 |
+
additional terms or conditions.
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/RELEASES.md
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Version 1.1.0 (2022-09-18)
|
| 2 |
+
==========================
|
| 3 |
+
* Add alloc feature.
|
| 4 |
+
This enables `AsciiString` and methods that take or return `Box<[AsciiStr]>` in `!#[no_std]`-mode.
|
| 5 |
+
* Add `AsciiStr::into_ascii_string()`, `AsciiString::into_boxed_ascii_str()` and `AsciiString::insert_str()`.
|
| 6 |
+
* Implement `From<Box<AsciiStr>>` and `From<AsciiChar>` for `AsciiString`.
|
| 7 |
+
* Implement `From<AsciiString>` for `Box<AsciiStr>`, `Rc<AsciiStr>`, `Arc<AsciiStr>` and `Vec<AsciiChar>`.
|
| 8 |
+
* Make `AsciiString::new()`, `AsciiStr::len()` and `AsciiStr::is_empty()` `const fn`.
|
| 9 |
+
* Require Rust 1.44.1.
|
| 10 |
+
|
| 11 |
+
Version 1.0.0 (2019-08-26)
|
| 12 |
+
==========================
|
| 13 |
+
|
| 14 |
+
Breaking changes:
|
| 15 |
+
|
| 16 |
+
* Change `AsciiChar.is_whitespace()` to also return true for '\0xb' (vertical tab) and '\0xc' (form feed).
|
| 17 |
+
* Remove quickcheck feature.
|
| 18 |
+
* Remove `AsciiStr::new()`.
|
| 19 |
+
* Rename `AsciiChar::from()` and `AsciiChar::from_unchecked()` to `from_ascii()` and `from_ascii_unchecked()`.
|
| 20 |
+
* Rename several `AsciiChar.is_xxx()` methods to `is_ascii_xxx()` (for comsistency with std).
|
| 21 |
+
* Rename `AsciiChar::Null` to `Nul` (for consistency with eg. `CStr::from_bytes_with_nul()`).
|
| 22 |
+
* Rename `AsciiStr.trim_left()` and `AsciiStr.trim_right()` to `trim_start()` and `trim_end()`.
|
| 23 |
+
* Remove impls of the deprecated `std::ascii::AsciiExt` trait.
|
| 24 |
+
* Change iterators `Chars`, `CharsMut` and `CharsRef` from type aliases to newtypes.
|
| 25 |
+
* Return `impl Trait` from `AsciiStr.lines()` and `AsciiStr.split()`, and remove iterator types `Lines` and `Split`.
|
| 26 |
+
* Add `slice_ascii_str()`, `get_ascii()` and `unwrap_ascii()` to the `AsAsciiStr` trait.
|
| 27 |
+
* Add `slice_mut_ascii_str()` and `unwrap_ascii_mut()` to the `AsMutAsciiStr` trait.
|
| 28 |
+
* Require Rust 1.33.0 for 1.0.\*, and allow later semver-compatible 1.y.0 releases to increase it.
|
| 29 |
+
|
| 30 |
+
Additions:
|
| 31 |
+
|
| 32 |
+
* Add `const fn` `AsciiChar::new()` which panicks on invalid values.
|
| 33 |
+
* Make most `AsciiChar` methods `const fn`.
|
| 34 |
+
* Add multiple `AsciiChar::is_[ascii_]xxx()` methods.
|
| 35 |
+
* Implement `AsRef<AsciiStr>` for `AsciiChar`.
|
| 36 |
+
* Make `AsciiString`'s `Extend` and `FromIterator` impl generic over all `AsRef<AsciiStr>`.
|
| 37 |
+
* Implement inclusive range indexing for `AsciiStr` (and thereby `AsciiString`).
|
| 38 |
+
* Mark `AsciiStr` and `AsciiString` `#[repr(transparent)]` (to `[AsciiChar]` and `Vec<AsciiChar>` respectively).
|
| 39 |
+
|
| 40 |
+
Version 0.9.3 (2019-08-26)
|
| 41 |
+
==========================
|
| 42 |
+
|
| 43 |
+
Soundness fix:
|
| 44 |
+
|
| 45 |
+
**Remove** [unsound](https://github.com/tomprogrammer/rust-ascii/issues/64) impls of `From<&mut AsciiStr>` for `&mut [u8]` and `&mut str`.
|
| 46 |
+
This is a breaking change, but theese impls can lead to undefined behavior in safe code.
|
| 47 |
+
|
| 48 |
+
If you use this impl and know that non-ASCII values are never inserted into the `[u8]` or `str`,
|
| 49 |
+
you can pin ascii to 0.9.2.
|
| 50 |
+
|
| 51 |
+
Other changes:
|
| 52 |
+
|
| 53 |
+
* Make quickcheck `Arbitrary` impl sometimes produce `AsciiChar::DEL`.
|
| 54 |
+
* Implement `Clone`, `Copy` and `Eq` for `ToAsciiCharError`.
|
| 55 |
+
* Implement `ToAsciiChar` for `u16`, `u32` and `i8`.
|
| 56 |
+
|
| 57 |
+
Version 0.9.2 (2019-07-07)
|
| 58 |
+
==========================
|
| 59 |
+
* Implement the `IntoAsciiString` trait for `std::ffi::CStr` and `std::ffi::CString` types,
|
| 60 |
+
and implemented the `AsAsciiStr` trait for `std::ffi::CStr` type.
|
| 61 |
+
* Implement the `IntoAsciiString` for `std::borrow::Cow`, where the inner types themselves
|
| 62 |
+
implement `IntoAsciiString`.
|
| 63 |
+
* Implement conversions between `AsciiString` and `Cow<'a, AsciiStr>`.
|
| 64 |
+
* Implement the `std::ops::AddAssign` trait for `AsciiString`.
|
| 65 |
+
* Implement `BorrowMut<AsciiStr>`, `AsRef<[AsciiChar]>`, `AsRef<str>`, `AsMut<[AsciiChar]>` for `AsciiString`.
|
| 66 |
+
* Implement `PartialEq<[u8]>` and `PartialEq<[AsciiChar]>` for `AsciiStr`.
|
| 67 |
+
* Add `AsciiStr::first()`, `AsciiStr::last()` and `AsciiStr::split()` methods.
|
| 68 |
+
* Implement `DoubleEndedIterator` for `AsciiStr::lines()`.
|
| 69 |
+
* Implement `AsRef<AsciiStr>` and `AsMut<AsciiStr` for `[AsciiChar]`.
|
| 70 |
+
* Implement `Default` for `AsciiChar`.
|
| 71 |
+
|
| 72 |
+
Version 0.9.1 (2018-09-12)
|
| 73 |
+
==========================
|
| 74 |
+
* Implement the `serde::Serialize` and `serde::Deserialize` traits for `AsciiChar`, `AsciiStr`, and `AsciiString`.
|
| 75 |
+
The implementation is enabled by the `serde` feature.
|
| 76 |
+
* **Bugfix**: `AsciiStr::lines()` now behaves similar to `str::lines()`.
|
| 77 |
+
([#51](https://github.com/tomprogrammer/rust-ascii/issues/51))
|
| 78 |
+
|
| 79 |
+
Version 0.9.0 (2018-04-05)
|
| 80 |
+
==========================
|
| 81 |
+
* Update the optional `quickcheck` feature to version 0.6.
|
| 82 |
+
|
| 83 |
+
Version 0.8.7 (2018-04-04)
|
| 84 |
+
==========================
|
| 85 |
+
* Implement `AsAsciiStr` and `AsMutAsciiStr` for references to to types that implement them.
|
| 86 |
+
* Make all methods of deprecated `AsciiExt` except `is_ascii()` available as inherent methods in std-mode.
|
| 87 |
+
* Compile without warnings on Rust 1.26.0
|
| 88 |
+
* Acknowledge that the crate doesn't compile on Rust < 1.8.0 (cannot be fixed without breaking changes).
|
| 89 |
+
|
| 90 |
+
Version 0.8.6 (2017-07-02)
|
| 91 |
+
==========================
|
| 92 |
+
* Implement `AsRef<u8> for AsciiString`.
|
| 93 |
+
|
| 94 |
+
Version 0.8.4 (2017-04-18)
|
| 95 |
+
==========================
|
| 96 |
+
* Fix the tests when running without std.
|
| 97 |
+
|
| 98 |
+
Version 0.8.3 (2017-04-18)
|
| 99 |
+
==========================
|
| 100 |
+
* Bugfix: `<AsciiStr as AsciiExt>::to_ascii_lowercase` did erroneously convert to uppercase.
|
| 101 |
+
|
| 102 |
+
Version 0.8.2 (2017-04-17)
|
| 103 |
+
==========================
|
| 104 |
+
* Implement `IntoAsciiString` for `&'a str` and `&'a [u8]`.
|
| 105 |
+
* Implement the `quickcheck::Arbitrary` trait for `AsciiChar` and `AsciiString`.
|
| 106 |
+
The implementation is enabled by the `quickcheck` feature.
|
| 107 |
+
|
| 108 |
+
Version 0.8.1 (2017-02-11)
|
| 109 |
+
==========================
|
| 110 |
+
* Add `Chars`, `CharsMut` and `Lines` iterators.
|
| 111 |
+
* Implement `std::fmt::Write` for `AsciiString`.
|
| 112 |
+
|
| 113 |
+
Version 0.8.0 (2017-01-02)
|
| 114 |
+
==========================
|
| 115 |
+
|
| 116 |
+
Breaking changes:
|
| 117 |
+
|
| 118 |
+
* Return `FromAsciiError` instead of the input when `AsciiString::from_ascii()` or `into_ascii_string()` fails.
|
| 119 |
+
* Replace the `no_std` feature with the additive `std` feature, which is part of the default features. (Issue #29)
|
| 120 |
+
* `AsciiChar::is_*()` and `::as_{byte,char}()` take `self` by value instead of by reference.
|
| 121 |
+
|
| 122 |
+
Additions:
|
| 123 |
+
|
| 124 |
+
* Make `AsciiChar` comparable with `char` and `u8`.
|
| 125 |
+
* Add `AsciiChar::as_printable_char()` and the free functions `caret_encode()` and `caret_decode()`.
|
| 126 |
+
* Implement some methods from `AsciiExt` and `Error` (which are not in libcore) directly in `core` mode:
|
| 127 |
+
* `Ascii{Char,Str}::eq_ignore_ascii_case()`
|
| 128 |
+
* `AsciiChar::to_ascii_{upper,lower}case()`
|
| 129 |
+
* `AsciiStr::make_ascii_{upper,lower}case()`
|
| 130 |
+
* `{ToAsciiChar,AsAsciiStr}Error::description()`
|
| 131 |
+
|
| 132 |
+
Version 0.7.1 (2016-08-15)
|
| 133 |
+
==========================
|
| 134 |
+
* Fix the implementation of `AsciiExt::to_ascii_lowercase()` for `AsciiChar` converting to uppercase. (introduced in 0.7.0)
|
| 135 |
+
|
| 136 |
+
Version 0.7.0 (2016-06-25)
|
| 137 |
+
==========================
|
| 138 |
+
* Rename `Ascii` to `AsciiChar` and convert it into an enum.
|
| 139 |
+
(with a variant for every ASCII character)
|
| 140 |
+
* Replace `OwnedAsciiCast` with `IntoAsciiString`.
|
| 141 |
+
* Replace `AsciiCast` with `As[Mut]AsciiStr` and `IntoAsciiChar`.
|
| 142 |
+
* Add *from[_ascii]_unchecked* methods.
|
| 143 |
+
* Replace *from_bytes* with *from_ascii* in method names.
|
| 144 |
+
* Return `std::error::Error`-implementing types instead of `()` and `None` when
|
| 145 |
+
conversion to `AsciiStr` or `AsciiChar` fails.
|
| 146 |
+
* Implement `AsciiExt` without the `unstable` Cargo feature flag, which is removed.
|
| 147 |
+
* Require Rust 1.9 or later.
|
| 148 |
+
* Add `#[no_std]` support in a Cargo feature.
|
| 149 |
+
* Implement `From<{&,&mut,Box<}AsciiStr>` for `[Ascii]`, `[u8]` and `str`
|
| 150 |
+
* Implement `From<{&,&mut,Box<}[Ascii]>`, `As{Ref,Mut}<[Ascii]>` and Default for `AsciiStr`
|
| 151 |
+
* Implement `From<Vec<Ascii>>` for `AsciiString`.
|
| 152 |
+
* Implement `AsMut<AsciiStr>` for `AsciiString`.
|
| 153 |
+
* Stop some `Ascii::is_xxx()` methods from panicking.
|
| 154 |
+
* Add `Ascii::is_whitespace()`.
|
| 155 |
+
* Add `AsciiString::as_mut_slice()`.
|
| 156 |
+
* Add raw pointer methods on `AsciiString`:
|
| 157 |
+
* `from_raw_parts`
|
| 158 |
+
* `as_ptr`
|
| 159 |
+
* `as_mut_ptr`
|
| 160 |
+
|
| 161 |
+
Version 0.6.0 (2015-12-30)
|
| 162 |
+
==========================
|
| 163 |
+
* Add `Ascii::from_byte()`
|
| 164 |
+
* Add `AsciiStr::trim[_{left,right}]()`
|
| 165 |
+
|
| 166 |
+
Version 0.5.4 (2015-07-29)
|
| 167 |
+
==========================
|
| 168 |
+
Implement `IndexMut` for AsciiStr and AsciiString.
|
| 169 |
+
|
| 170 |
+
Version 0.5.1 (2015-06-13)
|
| 171 |
+
==========================
|
| 172 |
+
* Add `Ascii::from()`.
|
| 173 |
+
* Implement `Index` for `AsciiStr` and `AsciiString`.
|
| 174 |
+
* Implement `Default`,`FromIterator`,`Extend` and `Add` for `AsciiString`
|
| 175 |
+
* Added inherent methods on `AsciiString`:
|
| 176 |
+
* `with_capacity`
|
| 177 |
+
* `push_str`
|
| 178 |
+
* `capacity`
|
| 179 |
+
* `reserve`
|
| 180 |
+
* `reserve_exact`
|
| 181 |
+
* `shrink_to_fit`
|
| 182 |
+
* `push`
|
| 183 |
+
* `truncate`
|
| 184 |
+
* `pop`
|
| 185 |
+
* `remove`
|
| 186 |
+
* `insert`
|
| 187 |
+
* `len`
|
| 188 |
+
* `is_empty`
|
| 189 |
+
* `clear`
|
| 190 |
+
|
| 191 |
+
Version 0.5.0 (2015-05-05)
|
| 192 |
+
==========================
|
| 193 |
+
First release compatible with Rust 1.0.0.
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/tests.rs
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
extern crate ascii;
|
| 2 |
+
|
| 3 |
+
use ascii::{AsAsciiStr, AsciiChar, AsciiStr};
|
| 4 |
+
#[cfg(feature = "std")]
|
| 5 |
+
use ascii::{AsciiString, IntoAsciiString};
|
| 6 |
+
|
| 7 |
+
#[test]
|
| 8 |
+
#[cfg(feature = "std")]
|
| 9 |
+
fn ascii_vec() {
|
| 10 |
+
let test = b"( ;";
|
| 11 |
+
let a = AsciiStr::from_ascii(test).unwrap();
|
| 12 |
+
assert_eq!(test.as_ascii_str(), Ok(a));
|
| 13 |
+
assert_eq!("( ;".as_ascii_str(), Ok(a));
|
| 14 |
+
let v = test.to_vec();
|
| 15 |
+
assert_eq!(v.as_ascii_str(), Ok(a));
|
| 16 |
+
assert_eq!("( ;".to_string().as_ascii_str(), Ok(a));
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
#[test]
|
| 20 |
+
fn to_ascii() {
|
| 21 |
+
assert!("zoä华".as_ascii_str().is_err());
|
| 22 |
+
assert!([127_u8, 128, 255].as_ascii_str().is_err());
|
| 23 |
+
|
| 24 |
+
let arr = [AsciiChar::ParenOpen, AsciiChar::Space, AsciiChar::Semicolon];
|
| 25 |
+
let a: &AsciiStr = (&arr[..]).into();
|
| 26 |
+
assert_eq!(b"( ;".as_ascii_str(), Ok(a));
|
| 27 |
+
assert_eq!("( ;".as_ascii_str(), Ok(a));
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
#[test]
|
| 31 |
+
#[cfg(feature = "std")]
|
| 32 |
+
fn into_ascii() {
|
| 33 |
+
let arr = [AsciiChar::ParenOpen, AsciiChar::Space, AsciiChar::Semicolon];
|
| 34 |
+
let v = AsciiString::from(arr.to_vec());
|
| 35 |
+
assert_eq!(b"( ;".to_vec().into_ascii_string(), Ok(v.clone()));
|
| 36 |
+
assert_eq!("( ;".to_string().into_ascii_string(), Ok(v.clone()));
|
| 37 |
+
assert_eq!(b"( ;", AsRef::<[u8]>::as_ref(&v));
|
| 38 |
+
|
| 39 |
+
let err = "zoä华".to_string().into_ascii_string().unwrap_err();
|
| 40 |
+
assert_eq!(Err(err.ascii_error()), "zoä华".as_ascii_str());
|
| 41 |
+
assert_eq!(err.into_source(), "zoä华");
|
| 42 |
+
let err = vec![127, 128, 255].into_ascii_string().unwrap_err();
|
| 43 |
+
assert_eq!(Err(err.ascii_error()), [127, 128, 255].as_ascii_str());
|
| 44 |
+
assert_eq!(err.into_source(), &[127, 128, 255]);
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
#[test]
|
| 48 |
+
#[cfg(feature = "std")]
|
| 49 |
+
fn compare_ascii_string_ascii_str() {
|
| 50 |
+
let v = b"abc";
|
| 51 |
+
let ascii_string = AsciiString::from_ascii(&v[..]).unwrap();
|
| 52 |
+
let ascii_str = AsciiStr::from_ascii(v).unwrap();
|
| 53 |
+
assert!(ascii_string == ascii_str);
|
| 54 |
+
assert!(ascii_str == ascii_string);
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
#[test]
|
| 58 |
+
#[cfg(feature = "std")]
|
| 59 |
+
fn compare_ascii_string_string() {
|
| 60 |
+
let v = b"abc";
|
| 61 |
+
let string = String::from_utf8(v.to_vec()).unwrap();
|
| 62 |
+
let ascii_string = AsciiString::from_ascii(&v[..]).unwrap();
|
| 63 |
+
assert!(string == ascii_string);
|
| 64 |
+
assert!(ascii_string == string);
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
#[test]
|
| 68 |
+
#[cfg(feature = "std")]
|
| 69 |
+
fn compare_ascii_str_string() {
|
| 70 |
+
let v = b"abc";
|
| 71 |
+
let string = String::from_utf8(v.to_vec()).unwrap();
|
| 72 |
+
let ascii_str = AsciiStr::from_ascii(&v[..]).unwrap();
|
| 73 |
+
assert!(string == ascii_str);
|
| 74 |
+
assert!(ascii_str == string);
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
#[test]
|
| 78 |
+
#[cfg(feature = "std")]
|
| 79 |
+
fn compare_ascii_string_str() {
|
| 80 |
+
let v = b"abc";
|
| 81 |
+
let sstr = ::std::str::from_utf8(v).unwrap();
|
| 82 |
+
let ascii_string = AsciiString::from_ascii(&v[..]).unwrap();
|
| 83 |
+
assert!(sstr == ascii_string);
|
| 84 |
+
assert!(ascii_string == sstr);
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
#[test]
|
| 88 |
+
fn compare_ascii_str_str() {
|
| 89 |
+
let v = b"abc";
|
| 90 |
+
let sstr = ::std::str::from_utf8(v).unwrap();
|
| 91 |
+
let ascii_str = AsciiStr::from_ascii(v).unwrap();
|
| 92 |
+
assert!(sstr == ascii_str);
|
| 93 |
+
assert!(ascii_str == sstr);
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
#[test]
|
| 97 |
+
#[allow(clippy::redundant_slicing)]
|
| 98 |
+
fn compare_ascii_str_slice() {
|
| 99 |
+
let b = b"abc".as_ascii_str().unwrap();
|
| 100 |
+
let c = b"ab".as_ascii_str().unwrap();
|
| 101 |
+
assert_eq!(&b[..2], &c[..]);
|
| 102 |
+
assert_eq!(c[1].as_char(), 'b');
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
#[test]
|
| 106 |
+
#[cfg(feature = "std")]
|
| 107 |
+
fn compare_ascii_string_slice() {
|
| 108 |
+
let b = AsciiString::from_ascii("abc").unwrap();
|
| 109 |
+
let c = AsciiString::from_ascii("ab").unwrap();
|
| 110 |
+
assert_eq!(&b[..2], &c[..]);
|
| 111 |
+
assert_eq!(c[1].as_char(), 'b');
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
#[test]
|
| 115 |
+
#[cfg(feature = "std")]
|
| 116 |
+
fn extend_from_iterator() {
|
| 117 |
+
use std::borrow::Cow;
|
| 118 |
+
|
| 119 |
+
let abc = "abc".as_ascii_str().unwrap();
|
| 120 |
+
let mut s = abc.chars().collect::<AsciiString>();
|
| 121 |
+
assert_eq!(s, abc);
|
| 122 |
+
s.extend(abc);
|
| 123 |
+
assert_eq!(s, "abcabc");
|
| 124 |
+
|
| 125 |
+
let lines = "one\ntwo\nthree".as_ascii_str().unwrap().lines();
|
| 126 |
+
s.extend(lines);
|
| 127 |
+
assert_eq!(s, "abcabconetwothree");
|
| 128 |
+
|
| 129 |
+
let cows = "ASCII Ascii ascii"
|
| 130 |
+
.as_ascii_str()
|
| 131 |
+
.unwrap()
|
| 132 |
+
.split(AsciiChar::Space)
|
| 133 |
+
.map(|case| {
|
| 134 |
+
if case.chars().all(AsciiChar::is_uppercase) {
|
| 135 |
+
Cow::from(case)
|
| 136 |
+
} else {
|
| 137 |
+
Cow::from(case.to_ascii_uppercase())
|
| 138 |
+
}
|
| 139 |
+
});
|
| 140 |
+
s.extend(cows);
|
| 141 |
+
s.extend(&[AsciiChar::LineFeed]);
|
| 142 |
+
assert_eq!(s, "abcabconetwothreeASCIIASCIIASCII\n");
|
| 143 |
+
}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/.cargo-ok
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"v":1}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/.cargo_vcs_info.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"git": {
|
| 3 |
+
"sha1": "60c6a72743c53f43b56cebc8f2f1bd70f63863f8"
|
| 4 |
+
},
|
| 5 |
+
"path_in_vcs": ""
|
| 6 |
+
}
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/.gitignore
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
wip
|
| 2 |
+
target
|
| 3 |
+
Cargo.lock
|
| 4 |
+
|
| 5 |
+
/.idea/
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/CHANGELOG.md
ADDED
|
@@ -0,0 +1,648 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 2.11.0
|
| 2 |
+
|
| 3 |
+
## What's Changed
|
| 4 |
+
* Fix use of Result in macro output by @james7132 in https://github.com/bitflags/bitflags/pull/462
|
| 5 |
+
* Add methods to get the known/unknown bits from a flags value by @WaterWhisperer in https://github.com/bitflags/bitflags/pull/473
|
| 6 |
+
|
| 7 |
+
## New Contributors
|
| 8 |
+
* @james7132 made their first contribution in https://github.com/bitflags/bitflags/pull/462
|
| 9 |
+
* @WaterWhisperer made their first contribution in https://github.com/bitflags/bitflags/pull/473
|
| 10 |
+
|
| 11 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.10.0...2.11.0
|
| 12 |
+
|
| 13 |
+
# 2.10.0
|
| 14 |
+
|
| 15 |
+
## What's Changed
|
| 16 |
+
* Implement iterator for all named flags by @ssrlive in https://github.com/bitflags/bitflags/pull/465
|
| 17 |
+
* Depend on serde_core instead of serde by @KodrAus in https://github.com/bitflags/bitflags/pull/467
|
| 18 |
+
|
| 19 |
+
## New Contributors
|
| 20 |
+
* @ssrlive made their first contribution in https://github.com/bitflags/bitflags/pull/465
|
| 21 |
+
|
| 22 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.4...2.10.0
|
| 23 |
+
|
| 24 |
+
# 2.9.4
|
| 25 |
+
|
| 26 |
+
## What's Changed
|
| 27 |
+
* Add Cargo features to readme by @KodrAus in https://github.com/bitflags/bitflags/pull/460
|
| 28 |
+
|
| 29 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.3...2.9.4
|
| 30 |
+
|
| 31 |
+
# 2.9.3
|
| 32 |
+
|
| 33 |
+
## What's Changed
|
| 34 |
+
* Streamline generated code by @nnethercote in https://github.com/bitflags/bitflags/pull/458
|
| 35 |
+
|
| 36 |
+
## New Contributors
|
| 37 |
+
* @nnethercote made their first contribution in https://github.com/bitflags/bitflags/pull/458
|
| 38 |
+
|
| 39 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.2...2.9.3
|
| 40 |
+
|
| 41 |
+
# 2.9.2
|
| 42 |
+
|
| 43 |
+
## What's Changed
|
| 44 |
+
* Fix difference in the spec by @KodrAus in https://github.com/bitflags/bitflags/pull/446
|
| 45 |
+
* Fix up inaccurate docs on bitflags_match by @KodrAus in https://github.com/bitflags/bitflags/pull/453
|
| 46 |
+
* Remove rustc internal crate feature by @KodrAus in https://github.com/bitflags/bitflags/pull/454
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.1...2.9.2
|
| 50 |
+
|
| 51 |
+
# 2.9.1
|
| 52 |
+
|
| 53 |
+
## What's Changed
|
| 54 |
+
* Document Cargo features by @KodrAus in https://github.com/bitflags/bitflags/pull/444
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.0...2.9.1
|
| 58 |
+
|
| 59 |
+
# 2.9.0
|
| 60 |
+
|
| 61 |
+
## What's Changed
|
| 62 |
+
* `Flags` trait: add `clear(&mut self)` method by @wysiwys in https://github.com/bitflags/bitflags/pull/437
|
| 63 |
+
* Fix up UI tests by @KodrAus in https://github.com/bitflags/bitflags/pull/438
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.8.0...2.9.0
|
| 67 |
+
|
| 68 |
+
# 2.8.0
|
| 69 |
+
|
| 70 |
+
## What's Changed
|
| 71 |
+
* feat(core): Add bitflags_match macro for bitflag matching by @YuniqueUnic in https://github.com/bitflags/bitflags/pull/423
|
| 72 |
+
* Finalize bitflags_match by @KodrAus in https://github.com/bitflags/bitflags/pull/431
|
| 73 |
+
|
| 74 |
+
## New Contributors
|
| 75 |
+
* @YuniqueUnic made their first contribution in https://github.com/bitflags/bitflags/pull/423
|
| 76 |
+
|
| 77 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.7.0...2.8.0
|
| 78 |
+
|
| 79 |
+
# 2.7.0
|
| 80 |
+
|
| 81 |
+
## What's Changed
|
| 82 |
+
* Fix `clippy::doc_lazy_continuation` lints by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/414
|
| 83 |
+
* Run clippy on extra features in CI. by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/415
|
| 84 |
+
* Fix CI: trybuild refresh, allow some clippy restrictions. by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/417
|
| 85 |
+
* Update zerocopy version in example by @KodrAus in https://github.com/bitflags/bitflags/pull/422
|
| 86 |
+
* Add method to check if unknown bits are set by @wysiwys in https://github.com/bitflags/bitflags/pull/426
|
| 87 |
+
* Update error messages by @KodrAus in https://github.com/bitflags/bitflags/pull/427
|
| 88 |
+
* Add `truncate(&mut self)` method to unset unknown bits by @wysiwys in https://github.com/bitflags/bitflags/pull/428
|
| 89 |
+
* Update error messages by @KodrAus in https://github.com/bitflags/bitflags/pull/429
|
| 90 |
+
|
| 91 |
+
## New Contributors
|
| 92 |
+
* @wysiwys made their first contribution in https://github.com/bitflags/bitflags/pull/426
|
| 93 |
+
|
| 94 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.6.0...2.7.0
|
| 95 |
+
|
| 96 |
+
# 2.6.0
|
| 97 |
+
|
| 98 |
+
## What's Changed
|
| 99 |
+
* Sync CHANGELOG.md with github release notes by @dextero in https://github.com/bitflags/bitflags/pull/402
|
| 100 |
+
* Update error messages and zerocopy by @KodrAus in https://github.com/bitflags/bitflags/pull/403
|
| 101 |
+
* Bump minimum declared versions of dependencies by @dextero in https://github.com/bitflags/bitflags/pull/404
|
| 102 |
+
* chore(deps): bump serde_derive and bytemuck versions by @joshka in https://github.com/bitflags/bitflags/pull/405
|
| 103 |
+
* add OSFF Scorecard workflow by @KodrAus in https://github.com/bitflags/bitflags/pull/396
|
| 104 |
+
* Update stderr messages by @KodrAus in https://github.com/bitflags/bitflags/pull/408
|
| 105 |
+
* Fix typo by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/410
|
| 106 |
+
* Allow specifying outer attributes in impl mode by @KodrAus in https://github.com/bitflags/bitflags/pull/411
|
| 107 |
+
|
| 108 |
+
## New Contributors
|
| 109 |
+
* @dextero made their first contribution in https://github.com/bitflags/bitflags/pull/402
|
| 110 |
+
* @joshka made their first contribution in https://github.com/bitflags/bitflags/pull/405
|
| 111 |
+
* @waywardmonkeys made their first contribution in https://github.com/bitflags/bitflags/pull/410
|
| 112 |
+
|
| 113 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.5.0...2.6.0
|
| 114 |
+
|
| 115 |
+
# 2.5.0
|
| 116 |
+
|
| 117 |
+
## What's Changed
|
| 118 |
+
* Derive `Debug` for `Flag<B>` by @tgross35 in https://github.com/bitflags/bitflags/pull/398
|
| 119 |
+
* Support truncating or strict-named variants of parsing and formatting by @KodrAus in https://github.com/bitflags/bitflags/pull/400
|
| 120 |
+
|
| 121 |
+
## New Contributors
|
| 122 |
+
* @tgross35 made their first contribution in https://github.com/bitflags/bitflags/pull/398
|
| 123 |
+
|
| 124 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.2...2.5.0
|
| 125 |
+
|
| 126 |
+
# 2.4.2
|
| 127 |
+
|
| 128 |
+
## What's Changed
|
| 129 |
+
* Cargo.toml: Anchor excludes to root of the package by @jamessan in https://github.com/bitflags/bitflags/pull/387
|
| 130 |
+
* Update error messages by @KodrAus in https://github.com/bitflags/bitflags/pull/390
|
| 131 |
+
* Add support for impl mode structs to be repr(packed) by @GnomedDev in https://github.com/bitflags/bitflags/pull/388
|
| 132 |
+
* Remove old `unused_tuple_struct_fields` lint by @dtolnay in https://github.com/bitflags/bitflags/pull/393
|
| 133 |
+
* Delete use of `local_inner_macros` by @dtolnay in https://github.com/bitflags/bitflags/pull/392
|
| 134 |
+
|
| 135 |
+
## New Contributors
|
| 136 |
+
* @jamessan made their first contribution in https://github.com/bitflags/bitflags/pull/387
|
| 137 |
+
* @GnomedDev made their first contribution in https://github.com/bitflags/bitflags/pull/388
|
| 138 |
+
|
| 139 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.1...2.4.2
|
| 140 |
+
|
| 141 |
+
# 2.4.1
|
| 142 |
+
|
| 143 |
+
## What's Changed
|
| 144 |
+
* Allow some new pedantic clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/380
|
| 145 |
+
|
| 146 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.0...2.4.1
|
| 147 |
+
|
| 148 |
+
# 2.4.0
|
| 149 |
+
|
| 150 |
+
## What's Changed
|
| 151 |
+
* Remove html_root_url by @eldruin in https://github.com/bitflags/bitflags/pull/368
|
| 152 |
+
* Support unnamed flags by @KodrAus in https://github.com/bitflags/bitflags/pull/371
|
| 153 |
+
* Update smoke test to verify all Clippy and rustc lints by @MitMaro in https://github.com/bitflags/bitflags/pull/374
|
| 154 |
+
* Specify the behavior of bitflags by @KodrAus in https://github.com/bitflags/bitflags/pull/369
|
| 155 |
+
|
| 156 |
+
## New Contributors
|
| 157 |
+
* @eldruin made their first contribution in https://github.com/bitflags/bitflags/pull/368
|
| 158 |
+
* @MitMaro made their first contribution in https://github.com/bitflags/bitflags/pull/374
|
| 159 |
+
|
| 160 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.3...2.4.0
|
| 161 |
+
|
| 162 |
+
# 2.3.3
|
| 163 |
+
|
| 164 |
+
## Changes to `-=`
|
| 165 |
+
|
| 166 |
+
The `-=` operator was incorrectly changed to truncate bits that didn't correspond to valid flags in `2.3.0`. This has
|
| 167 |
+
been fixed up so it once again behaves the same as `-` and `difference`.
|
| 168 |
+
|
| 169 |
+
## Changes to `!`
|
| 170 |
+
|
| 171 |
+
The `!` operator previously called `Self::from_bits_truncate`, which would truncate any bits that only partially
|
| 172 |
+
overlapped with a valid flag. It will now use `bits & Self::all().bits()`, so any bits that overlap any bits
|
| 173 |
+
specified by any flag will be respected. This is unlikely to have any practical implications, but enables defining
|
| 174 |
+
a flag like `const ALL = !0` as a way to signal that any bit pattern is a known set of flags.
|
| 175 |
+
|
| 176 |
+
## Changes to formatting
|
| 177 |
+
|
| 178 |
+
Zero-valued flags will never be printed. You'll either get `0x0` for empty flags using debug formatting, or the
|
| 179 |
+
set of flags with zero-valued flags omitted for others.
|
| 180 |
+
|
| 181 |
+
Composite flags will no longer be redundantly printed if there are extra bits to print at the end that don't correspond
|
| 182 |
+
to a valid flag.
|
| 183 |
+
|
| 184 |
+
## What's Changed
|
| 185 |
+
* Fix up incorrect sub assign behavior and other cleanups by @KodrAus in https://github.com/bitflags/bitflags/pull/366
|
| 186 |
+
|
| 187 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.2...2.3.3
|
| 188 |
+
|
| 189 |
+
# 2.3.2
|
| 190 |
+
|
| 191 |
+
## What's Changed
|
| 192 |
+
* [doc] [src/lib.rs] delete redundant path prefix by @OccupyMars2025 in https://github.com/bitflags/bitflags/pull/361
|
| 193 |
+
|
| 194 |
+
## New Contributors
|
| 195 |
+
* @OccupyMars2025 made their first contribution in https://github.com/bitflags/bitflags/pull/361
|
| 196 |
+
|
| 197 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.1...2.3.2
|
| 198 |
+
|
| 199 |
+
# 2.3.1
|
| 200 |
+
|
| 201 |
+
## What's Changed
|
| 202 |
+
* Fix Self in flags value expressions by @KodrAus in https://github.com/bitflags/bitflags/pull/355
|
| 203 |
+
|
| 204 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.0...2.3.1
|
| 205 |
+
|
| 206 |
+
# 2.3.0
|
| 207 |
+
|
| 208 |
+
## Major changes
|
| 209 |
+
|
| 210 |
+
### `BitFlags` trait deprecated in favor of `Flags` trait
|
| 211 |
+
|
| 212 |
+
This release introduces the `Flags` trait and deprecates the `BitFlags` trait. These two traits are semver compatible so if you have public API code depending on `BitFlags` you can move to `Flags` without breaking end-users. This is possible because the `BitFlags` trait was never publicly implementable, so it now carries `Flags` as a supertrait. All implementations of `Flags` additionally implement `BitFlags`.
|
| 213 |
+
|
| 214 |
+
The `Flags` trait is a publicly implementable version of the old `BitFlags` trait. The original `BitFlags` trait carried some macro baggage that made it difficult to implement, so a new `Flags` trait has been introduced as the _One True Trait_ for interacting with flags types generically. See the the `macro_free` and `custom_derive` examples for more details.
|
| 215 |
+
|
| 216 |
+
### `Bits` trait publicly exposed
|
| 217 |
+
|
| 218 |
+
The `Bits` trait for the underlying storage of flags values is also now publicly implementable. This lets you define your own exotic backing storage for flags. See the `custom_bits_type` example for more details.
|
| 219 |
+
|
| 220 |
+
## What's Changed
|
| 221 |
+
* Use explicit hashes for actions steps by @KodrAus in https://github.com/bitflags/bitflags/pull/350
|
| 222 |
+
* Support ejecting flags types from the bitflags macro by @KodrAus in https://github.com/bitflags/bitflags/pull/351
|
| 223 |
+
|
| 224 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.2.1...2.3.0
|
| 225 |
+
|
| 226 |
+
# 2.2.1
|
| 227 |
+
|
| 228 |
+
## What's Changed
|
| 229 |
+
* Refactor attribute filtering to apply per-flag by @KodrAus in https://github.com/bitflags/bitflags/pull/345
|
| 230 |
+
|
| 231 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.2.0...2.2.1
|
| 232 |
+
|
| 233 |
+
# 2.2.0
|
| 234 |
+
|
| 235 |
+
## What's Changed
|
| 236 |
+
* Create SECURITY.md by @KodrAus in https://github.com/bitflags/bitflags/pull/338
|
| 237 |
+
* add docs to describe the behavior of multi-bit flags by @nicholasbishop in https://github.com/bitflags/bitflags/pull/340
|
| 238 |
+
* Add support for bytemuck by @KodrAus in https://github.com/bitflags/bitflags/pull/336
|
| 239 |
+
* Add a top-level macro for filtering attributes by @KodrAus in https://github.com/bitflags/bitflags/pull/341
|
| 240 |
+
|
| 241 |
+
## New Contributors
|
| 242 |
+
* @nicholasbishop made their first contribution in https://github.com/bitflags/bitflags/pull/340
|
| 243 |
+
|
| 244 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.1.0...2.2.0
|
| 245 |
+
|
| 246 |
+
# 2.1.0
|
| 247 |
+
|
| 248 |
+
## What's Changed
|
| 249 |
+
* Add docs for the internal Field0 and examples of formatting/parsing by @KodrAus in https://github.com/bitflags/bitflags/pull/328
|
| 250 |
+
* Add support for arbitrary by @KodrAus in https://github.com/bitflags/bitflags/pull/324
|
| 251 |
+
* Fix up missing docs for consts within consts by @KodrAus in https://github.com/bitflags/bitflags/pull/330
|
| 252 |
+
* Ignore clippy lint in generated code by @Jake-Shadle in https://github.com/bitflags/bitflags/pull/331
|
| 253 |
+
|
| 254 |
+
## New Contributors
|
| 255 |
+
* @Jake-Shadle made their first contribution in https://github.com/bitflags/bitflags/pull/331
|
| 256 |
+
|
| 257 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.2...2.1.0
|
| 258 |
+
|
| 259 |
+
# 2.0.2
|
| 260 |
+
|
| 261 |
+
## What's Changed
|
| 262 |
+
* Fix up missing isize and usize Bits impls by @KodrAus in https://github.com/bitflags/bitflags/pull/321
|
| 263 |
+
|
| 264 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.1...2.0.2
|
| 265 |
+
|
| 266 |
+
# 2.0.1
|
| 267 |
+
|
| 268 |
+
## What's Changed
|
| 269 |
+
* Fix up some docs issues by @KodrAus in https://github.com/bitflags/bitflags/pull/309
|
| 270 |
+
* Make empty_flag() const. by @tormeh in https://github.com/bitflags/bitflags/pull/313
|
| 271 |
+
* Fix formatting of multi-bit flags with partial overlap by @KodrAus in https://github.com/bitflags/bitflags/pull/316
|
| 272 |
+
|
| 273 |
+
## New Contributors
|
| 274 |
+
* @tormeh made their first contribution in https://github.com/bitflags/bitflags/pull/313
|
| 275 |
+
|
| 276 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0...2.0.1
|
| 277 |
+
|
| 278 |
+
# 2.0.0
|
| 279 |
+
|
| 280 |
+
## Major changes
|
| 281 |
+
|
| 282 |
+
This release includes some major changes over `1.x`. If you use `bitflags!` types in your public API then upgrading this library may cause breakage in your downstream users.
|
| 283 |
+
|
| 284 |
+
### ⚠️ Serialization
|
| 285 |
+
|
| 286 |
+
You'll need to add the `serde` Cargo feature in order to `#[derive(Serialize, Deserialize)]` on your generated flags types:
|
| 287 |
+
|
| 288 |
+
```rust
|
| 289 |
+
bitflags! {
|
| 290 |
+
#[derive(Serialize, Deserialize)]
|
| 291 |
+
#[serde(transparent)]
|
| 292 |
+
pub struct Flags: T {
|
| 293 |
+
..
|
| 294 |
+
}
|
| 295 |
+
}
|
| 296 |
+
```
|
| 297 |
+
|
| 298 |
+
where `T` is the underlying bits type you're using, such as `u32`.
|
| 299 |
+
|
| 300 |
+
The default serialization format with `serde` **has changed** if you `#[derive(Serialize, Deserialize)]` on your generated flags types. It will now use a formatted string for human-readable formats and the underlying bits type for compact formats.
|
| 301 |
+
|
| 302 |
+
To keep the old format, see the https://github.com/KodrAus/bitflags-serde-legacy library.
|
| 303 |
+
|
| 304 |
+
### ⚠️ Traits
|
| 305 |
+
|
| 306 |
+
Generated flags types now derive fewer traits. If you need to maintain backwards compatibility, you can derive the following yourself:
|
| 307 |
+
|
| 308 |
+
```rust
|
| 309 |
+
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)]
|
| 310 |
+
```
|
| 311 |
+
|
| 312 |
+
### ⚠️ Methods
|
| 313 |
+
|
| 314 |
+
The unsafe `from_bits_unchecked` method is now a safe `from_bits_retain` method.
|
| 315 |
+
|
| 316 |
+
You can add the following method to your generated types to keep them compatible:
|
| 317 |
+
|
| 318 |
+
```rust
|
| 319 |
+
#[deprecated = "use the safe `from_bits_retain` method instead"]
|
| 320 |
+
pub unsafe fn from_bits_unchecked(bits: T) -> Self {
|
| 321 |
+
Self::from_bits_retain(bits)
|
| 322 |
+
}
|
| 323 |
+
```
|
| 324 |
+
|
| 325 |
+
where `T` is the underlying bits type you're using, such as `u32`.
|
| 326 |
+
|
| 327 |
+
### ⚠️ `.bits` field
|
| 328 |
+
|
| 329 |
+
You can now use the `.bits()` method instead of the old `.bits`.
|
| 330 |
+
|
| 331 |
+
The representation of generated flags types has changed from a struct with the single field `bits` to a newtype.
|
| 332 |
+
|
| 333 |
+
## What's Changed
|
| 334 |
+
* Fix a typo and call out MSRV bump by @KodrAus in https://github.com/bitflags/bitflags/pull/259
|
| 335 |
+
* BitFlags trait by @arturoc in https://github.com/bitflags/bitflags/pull/220
|
| 336 |
+
* Add a hidden trait to discourage manual impls of BitFlags by @KodrAus in https://github.com/bitflags/bitflags/pull/261
|
| 337 |
+
* Sanitize `Ok` by @konsumlamm in https://github.com/bitflags/bitflags/pull/266
|
| 338 |
+
* Fix bug in `Debug` implementation by @konsumlamm in https://github.com/bitflags/bitflags/pull/268
|
| 339 |
+
* Fix a typo in the generated documentation by @wackbyte in https://github.com/bitflags/bitflags/pull/271
|
| 340 |
+
* Use SPDX license format by @atouchet in https://github.com/bitflags/bitflags/pull/272
|
| 341 |
+
* serde tests fail in CI by @arturoc in https://github.com/bitflags/bitflags/pull/277
|
| 342 |
+
* Fix beta test output by @KodrAus in https://github.com/bitflags/bitflags/pull/279
|
| 343 |
+
* Add example to the README.md file by @tiaanl in https://github.com/bitflags/bitflags/pull/270
|
| 344 |
+
* Iterator over all the enabled options by @arturoc in https://github.com/bitflags/bitflags/pull/278
|
| 345 |
+
* from_bits_(truncate) fail with composite flags by @arturoc in https://github.com/bitflags/bitflags/pull/276
|
| 346 |
+
* Add more platform coverage to CI by @KodrAus in https://github.com/bitflags/bitflags/pull/280
|
| 347 |
+
* rework the way cfgs are handled by @KodrAus in https://github.com/bitflags/bitflags/pull/281
|
| 348 |
+
* Split generated code into two types by @KodrAus in https://github.com/bitflags/bitflags/pull/282
|
| 349 |
+
* expose bitflags iters using nameable types by @KodrAus in https://github.com/bitflags/bitflags/pull/286
|
| 350 |
+
* Support creating flags from their names by @KodrAus in https://github.com/bitflags/bitflags/pull/287
|
| 351 |
+
* Update README.md by @KodrAus in https://github.com/bitflags/bitflags/pull/288
|
| 352 |
+
* Prepare for 2.0.0-rc.1 release by @KodrAus in https://github.com/bitflags/bitflags/pull/289
|
| 353 |
+
* Add missing "if" to contains doc-comment in traits.rs by @rusty-snake in https://github.com/bitflags/bitflags/pull/291
|
| 354 |
+
* Forbid unsafe_code by @fintelia in https://github.com/bitflags/bitflags/pull/294
|
| 355 |
+
* serde: enable no-std support by @nim65s in https://github.com/bitflags/bitflags/pull/296
|
| 356 |
+
* Add a parser for flags formatted as bar-separated-values by @KodrAus in https://github.com/bitflags/bitflags/pull/297
|
| 357 |
+
* Prepare for 2.0.0-rc.2 release by @KodrAus in https://github.com/bitflags/bitflags/pull/299
|
| 358 |
+
* Use strip_prefix instead of starts_with + slice by @QuinnPainter in https://github.com/bitflags/bitflags/pull/301
|
| 359 |
+
* Fix up some clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/302
|
| 360 |
+
* Prepare for 2.0.0-rc.3 release by @KodrAus in https://github.com/bitflags/bitflags/pull/303
|
| 361 |
+
* feat: Add minimum permissions to rust.yml workflow by @gabibguti in https://github.com/bitflags/bitflags/pull/305
|
| 362 |
+
|
| 363 |
+
## New Contributors
|
| 364 |
+
* @wackbyte made their first contribution in https://github.com/bitflags/bitflags/pull/271
|
| 365 |
+
* @atouchet made their first contribution in https://github.com/bitflags/bitflags/pull/272
|
| 366 |
+
* @tiaanl made their first contribution in https://github.com/bitflags/bitflags/pull/270
|
| 367 |
+
* @rusty-snake made their first contribution in https://github.com/bitflags/bitflags/pull/291
|
| 368 |
+
* @fintelia made their first contribution in https://github.com/bitflags/bitflags/pull/294
|
| 369 |
+
* @nim65s made their first contribution in https://github.com/bitflags/bitflags/pull/296
|
| 370 |
+
* @QuinnPainter made their first contribution in https://github.com/bitflags/bitflags/pull/301
|
| 371 |
+
* @gabibguti made their first contribution in https://github.com/bitflags/bitflags/pull/305
|
| 372 |
+
|
| 373 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/1.3.2...2.0.0
|
| 374 |
+
|
| 375 |
+
# 2.0.0-rc.3
|
| 376 |
+
|
| 377 |
+
## What's Changed
|
| 378 |
+
* Use strip_prefix instead of starts_with + slice by @QuinnPainter in https://github.com/bitflags/bitflags/pull/301
|
| 379 |
+
* Fix up some clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/302
|
| 380 |
+
|
| 381 |
+
## New Contributors
|
| 382 |
+
* @QuinnPainter made their first contribution in https://github.com/bitflags/bitflags/pull/301
|
| 383 |
+
|
| 384 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0-rc.2...2.0.0-rc.3
|
| 385 |
+
|
| 386 |
+
# 2.0.0-rc.2
|
| 387 |
+
|
| 388 |
+
## Changes to `serde` serialization
|
| 389 |
+
|
| 390 |
+
**⚠️ NOTE ⚠️** This release changes the default serialization you'll get if you `#[derive(Serialize, Deserialize)]`
|
| 391 |
+
on your generated flags types. It will now use a formatted string for human-readable formats and the underlying bits
|
| 392 |
+
type for compact formats.
|
| 393 |
+
|
| 394 |
+
To keep the old behavior, see the [`bitflags-serde-legacy`](https://github.com/KodrAus/bitflags-serde-legacy) library.
|
| 395 |
+
|
| 396 |
+
## What's Changed
|
| 397 |
+
|
| 398 |
+
* Add missing "if" to contains doc-comment in traits.rs by @rusty-snake in https://github.com/bitflags/bitflags/pull/291
|
| 399 |
+
* Forbid unsafe_code by @fintelia in https://github.com/bitflags/bitflags/pull/294
|
| 400 |
+
* serde: enable no-std support by @nim65s in https://github.com/bitflags/bitflags/pull/296
|
| 401 |
+
* Add a parser for flags formatted as bar-separated-values by @KodrAus in https://github.com/bitflags/bitflags/pull/297
|
| 402 |
+
|
| 403 |
+
## New Contributors
|
| 404 |
+
* @rusty-snake made their first contribution in https://github.com/bitflags/bitflags/pull/291
|
| 405 |
+
* @fintelia made their first contribution in https://github.com/bitflags/bitflags/pull/294
|
| 406 |
+
* @nim65s made their first contribution in https://github.com/bitflags/bitflags/pull/296
|
| 407 |
+
|
| 408 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0-rc.1...2.0.0-rc.2
|
| 409 |
+
|
| 410 |
+
# 2.0.0-rc.1
|
| 411 |
+
|
| 412 |
+
This is a big release including a few years worth of work on a new `BitFlags` trait, iteration, and better macro organization for future extensibility.
|
| 413 |
+
|
| 414 |
+
## What's Changed
|
| 415 |
+
* Fix a typo and call out MSRV bump by @KodrAus in https://github.com/bitflags/bitflags/pull/259
|
| 416 |
+
* BitFlags trait by @arturoc in https://github.com/bitflags/bitflags/pull/220
|
| 417 |
+
* Add a hidden trait to discourage manual impls of BitFlags by @KodrAus in https://github.com/bitflags/bitflags/pull/261
|
| 418 |
+
* Sanitize `Ok` by @konsumlamm in https://github.com/bitflags/bitflags/pull/266
|
| 419 |
+
* Fix bug in `Debug` implementation by @konsumlamm in https://github.com/bitflags/bitflags/pull/268
|
| 420 |
+
* Fix a typo in the generated documentation by @wackbyte in https://github.com/bitflags/bitflags/pull/271
|
| 421 |
+
* Use SPDX license format by @atouchet in https://github.com/bitflags/bitflags/pull/272
|
| 422 |
+
* serde tests fail in CI by @arturoc in https://github.com/bitflags/bitflags/pull/277
|
| 423 |
+
* Fix beta test output by @KodrAus in https://github.com/bitflags/bitflags/pull/279
|
| 424 |
+
* Add example to the README.md file by @tiaanl in https://github.com/bitflags/bitflags/pull/270
|
| 425 |
+
* Iterator over all the enabled options by @arturoc in https://github.com/bitflags/bitflags/pull/278
|
| 426 |
+
* from_bits_(truncate) fail with composite flags by @arturoc in https://github.com/bitflags/bitflags/pull/276
|
| 427 |
+
* Add more platform coverage to CI by @KodrAus in https://github.com/bitflags/bitflags/pull/280
|
| 428 |
+
* rework the way cfgs are handled by @KodrAus in https://github.com/bitflags/bitflags/pull/281
|
| 429 |
+
* Split generated code into two types by @KodrAus in https://github.com/bitflags/bitflags/pull/282
|
| 430 |
+
* expose bitflags iters using nameable types by @KodrAus in https://github.com/bitflags/bitflags/pull/286
|
| 431 |
+
* Support creating flags from their names by @KodrAus in https://github.com/bitflags/bitflags/pull/287
|
| 432 |
+
* Update README.md by @KodrAus in https://github.com/bitflags/bitflags/pull/288
|
| 433 |
+
|
| 434 |
+
## New Contributors
|
| 435 |
+
* @wackbyte made their first contribution in https://github.com/bitflags/bitflags/pull/271
|
| 436 |
+
* @atouchet made their first contribution in https://github.com/bitflags/bitflags/pull/272
|
| 437 |
+
* @tiaanl made their first contribution in https://github.com/bitflags/bitflags/pull/270
|
| 438 |
+
|
| 439 |
+
**Full Changelog**: https://github.com/bitflags/bitflags/compare/1.3.2...2.0.0-rc.1
|
| 440 |
+
|
| 441 |
+
# 1.3.2
|
| 442 |
+
|
| 443 |
+
- Allow `non_snake_case` in generated flags types ([#256])
|
| 444 |
+
|
| 445 |
+
[#256]: https://github.com/bitflags/bitflags/pull/256
|
| 446 |
+
|
| 447 |
+
# 1.3.1
|
| 448 |
+
|
| 449 |
+
- Revert unconditional `#[repr(transparent)]` ([#252])
|
| 450 |
+
|
| 451 |
+
[#252]: https://github.com/bitflags/bitflags/pull/252
|
| 452 |
+
|
| 453 |
+
# 1.3.0 (yanked)
|
| 454 |
+
|
| 455 |
+
**This release bumps the Minimum Supported Rust Version to `1.46.0`**
|
| 456 |
+
|
| 457 |
+
- Add `#[repr(transparent)]` ([#187])
|
| 458 |
+
|
| 459 |
+
- End `empty` doc comment with full stop ([#202])
|
| 460 |
+
|
| 461 |
+
- Fix typo in crate root docs ([#206])
|
| 462 |
+
|
| 463 |
+
- Document from_bits_unchecked unsafety ([#207])
|
| 464 |
+
|
| 465 |
+
- Let `is_all` ignore extra bits ([#211])
|
| 466 |
+
|
| 467 |
+
- Allows empty flag definition ([#225])
|
| 468 |
+
|
| 469 |
+
- Making crate accessible from std ([#227])
|
| 470 |
+
|
| 471 |
+
- Make `from_bits` a const fn ([#229])
|
| 472 |
+
|
| 473 |
+
- Allow multiple bitflags structs in one macro invocation ([#235])
|
| 474 |
+
|
| 475 |
+
- Add named functions to perform set operations ([#244])
|
| 476 |
+
|
| 477 |
+
- Fix typos in method docs ([#245])
|
| 478 |
+
|
| 479 |
+
- Modernization of the `bitflags` macro to take advantage of newer features and 2018 idioms ([#246])
|
| 480 |
+
|
| 481 |
+
- Fix regression (in an unreleased feature) and simplify tests ([#247])
|
| 482 |
+
|
| 483 |
+
- Use `Self` and fix bug when overriding `stringify!` ([#249])
|
| 484 |
+
|
| 485 |
+
[#187]: https://github.com/bitflags/bitflags/pull/187
|
| 486 |
+
[#202]: https://github.com/bitflags/bitflags/pull/202
|
| 487 |
+
[#206]: https://github.com/bitflags/bitflags/pull/206
|
| 488 |
+
[#207]: https://github.com/bitflags/bitflags/pull/207
|
| 489 |
+
[#211]: https://github.com/bitflags/bitflags/pull/211
|
| 490 |
+
[#225]: https://github.com/bitflags/bitflags/pull/225
|
| 491 |
+
[#227]: https://github.com/bitflags/bitflags/pull/227
|
| 492 |
+
[#229]: https://github.com/bitflags/bitflags/pull/229
|
| 493 |
+
[#235]: https://github.com/bitflags/bitflags/pull/235
|
| 494 |
+
[#244]: https://github.com/bitflags/bitflags/pull/244
|
| 495 |
+
[#245]: https://github.com/bitflags/bitflags/pull/245
|
| 496 |
+
[#246]: https://github.com/bitflags/bitflags/pull/246
|
| 497 |
+
[#247]: https://github.com/bitflags/bitflags/pull/247
|
| 498 |
+
[#249]: https://github.com/bitflags/bitflags/pull/249
|
| 499 |
+
|
| 500 |
+
# 1.2.1
|
| 501 |
+
|
| 502 |
+
- Remove extraneous `#[inline]` attributes ([#194])
|
| 503 |
+
|
| 504 |
+
[#194]: https://github.com/bitflags/bitflags/pull/194
|
| 505 |
+
|
| 506 |
+
# 1.2.0
|
| 507 |
+
|
| 508 |
+
- Fix typo: {Lower, Upper}Exp - {Lower, Upper}Hex ([#183])
|
| 509 |
+
|
| 510 |
+
- Add support for "unknown" bits ([#188])
|
| 511 |
+
|
| 512 |
+
[#183]: https://github.com/rust-lang-nursery/bitflags/pull/183
|
| 513 |
+
[#188]: https://github.com/rust-lang-nursery/bitflags/pull/188
|
| 514 |
+
|
| 515 |
+
# 1.1.0
|
| 516 |
+
|
| 517 |
+
This is a re-release of `1.0.5`, which was yanked due to a bug in the RLS.
|
| 518 |
+
|
| 519 |
+
# 1.0.5
|
| 520 |
+
|
| 521 |
+
- Use compiletest_rs flags supported by stable toolchain ([#171])
|
| 522 |
+
|
| 523 |
+
- Put the user provided attributes first ([#173])
|
| 524 |
+
|
| 525 |
+
- Make bitflags methods `const` on newer compilers ([#175])
|
| 526 |
+
|
| 527 |
+
[#171]: https://github.com/rust-lang-nursery/bitflags/pull/171
|
| 528 |
+
[#173]: https://github.com/rust-lang-nursery/bitflags/pull/173
|
| 529 |
+
[#175]: https://github.com/rust-lang-nursery/bitflags/pull/175
|
| 530 |
+
|
| 531 |
+
# 1.0.4
|
| 532 |
+
|
| 533 |
+
- Support Rust 2018 style macro imports ([#165])
|
| 534 |
+
|
| 535 |
+
```rust
|
| 536 |
+
use bitflags::bitflags;
|
| 537 |
+
```
|
| 538 |
+
|
| 539 |
+
[#165]: https://github.com/rust-lang-nursery/bitflags/pull/165
|
| 540 |
+
|
| 541 |
+
# 1.0.3
|
| 542 |
+
|
| 543 |
+
- Improve zero value flag handling and documentation ([#157])
|
| 544 |
+
|
| 545 |
+
[#157]: https://github.com/rust-lang-nursery/bitflags/pull/157
|
| 546 |
+
|
| 547 |
+
# 1.0.2
|
| 548 |
+
|
| 549 |
+
- 30% improvement in compile time of bitflags crate ([#156])
|
| 550 |
+
|
| 551 |
+
- Documentation improvements ([#153])
|
| 552 |
+
|
| 553 |
+
- Implementation cleanup ([#149])
|
| 554 |
+
|
| 555 |
+
[#156]: https://github.com/rust-lang-nursery/bitflags/pull/156
|
| 556 |
+
[#153]: https://github.com/rust-lang-nursery/bitflags/pull/153
|
| 557 |
+
[#149]: https://github.com/rust-lang-nursery/bitflags/pull/149
|
| 558 |
+
|
| 559 |
+
# 1.0.1
|
| 560 |
+
- Add support for `pub(restricted)` specifier on the bitflags struct ([#135])
|
| 561 |
+
- Optimize performance of `all()` when called from a separate crate ([#136])
|
| 562 |
+
|
| 563 |
+
[#135]: https://github.com/rust-lang-nursery/bitflags/pull/135
|
| 564 |
+
[#136]: https://github.com/rust-lang-nursery/bitflags/pull/136
|
| 565 |
+
|
| 566 |
+
# 1.0.0
|
| 567 |
+
- **[breaking change]** Macro now generates [associated constants](https://doc.rust-lang.org/reference/items.html#associated-constants) ([#24])
|
| 568 |
+
|
| 569 |
+
- **[breaking change]** Minimum supported version is Rust **1.20**, due to usage of associated constants
|
| 570 |
+
|
| 571 |
+
- After being broken in 0.9, the `#[deprecated]` attribute is now supported again ([#112])
|
| 572 |
+
|
| 573 |
+
- Other improvements to unit tests and documentation ([#106] and [#115])
|
| 574 |
+
|
| 575 |
+
[#24]: https://github.com/rust-lang-nursery/bitflags/pull/24
|
| 576 |
+
[#106]: https://github.com/rust-lang-nursery/bitflags/pull/106
|
| 577 |
+
[#112]: https://github.com/rust-lang-nursery/bitflags/pull/112
|
| 578 |
+
[#115]: https://github.com/rust-lang-nursery/bitflags/pull/115
|
| 579 |
+
|
| 580 |
+
## How to update your code to use associated constants
|
| 581 |
+
Assuming the following structure definition:
|
| 582 |
+
```rust
|
| 583 |
+
bitflags! {
|
| 584 |
+
struct Something: u8 {
|
| 585 |
+
const FOO = 0b01,
|
| 586 |
+
const BAR = 0b10
|
| 587 |
+
}
|
| 588 |
+
}
|
| 589 |
+
```
|
| 590 |
+
In 0.9 and older you could do:
|
| 591 |
+
```rust
|
| 592 |
+
let x = FOO.bits | BAR.bits;
|
| 593 |
+
```
|
| 594 |
+
Now you must use:
|
| 595 |
+
```rust
|
| 596 |
+
let x = Something::FOO.bits | Something::BAR.bits;
|
| 597 |
+
```
|
| 598 |
+
|
| 599 |
+
# 0.9.1
|
| 600 |
+
- Fix the implementation of `Formatting` traits when other formatting traits were present in scope ([#105])
|
| 601 |
+
|
| 602 |
+
[#105]: https://github.com/rust-lang-nursery/bitflags/pull/105
|
| 603 |
+
|
| 604 |
+
# 0.9.0
|
| 605 |
+
- **[breaking change]** Use struct keyword instead of flags to define bitflag types ([#84])
|
| 606 |
+
|
| 607 |
+
- **[breaking change]** Terminate const items with semicolons instead of commas ([#87])
|
| 608 |
+
|
| 609 |
+
- Implement the `Hex`, `Octal`, and `Binary` formatting traits ([#86])
|
| 610 |
+
|
| 611 |
+
- Printing an empty flag value with the `Debug` trait now prints "(empty)" instead of nothing ([#85])
|
| 612 |
+
|
| 613 |
+
- The `bitflags!` macro can now be used inside of a fn body, to define a type local to that function ([#74])
|
| 614 |
+
|
| 615 |
+
[#74]: https://github.com/rust-lang-nursery/bitflags/pull/74
|
| 616 |
+
[#84]: https://github.com/rust-lang-nursery/bitflags/pull/84
|
| 617 |
+
[#85]: https://github.com/rust-lang-nursery/bitflags/pull/85
|
| 618 |
+
[#86]: https://github.com/rust-lang-nursery/bitflags/pull/86
|
| 619 |
+
[#87]: https://github.com/rust-lang-nursery/bitflags/pull/87
|
| 620 |
+
|
| 621 |
+
# 0.8.2
|
| 622 |
+
- Update feature flag used when building bitflags as a dependency of the Rust toolchain
|
| 623 |
+
|
| 624 |
+
# 0.8.1
|
| 625 |
+
- Allow bitflags to be used as a dependency of the Rust toolchain
|
| 626 |
+
|
| 627 |
+
# 0.8.0
|
| 628 |
+
- Add support for the experimental `i128` and `u128` integer types ([#57])
|
| 629 |
+
- Add set method: `flags.set(SOME_FLAG, true)` or `flags.set(SOME_FLAG, false)` ([#55])
|
| 630 |
+
This may break code that defines its own set method
|
| 631 |
+
|
| 632 |
+
[#55]: https://github.com/rust-lang-nursery/bitflags/pull/55
|
| 633 |
+
[#57]: https://github.com/rust-lang-nursery/bitflags/pull/57
|
| 634 |
+
|
| 635 |
+
# 0.7.1
|
| 636 |
+
*(yanked)*
|
| 637 |
+
|
| 638 |
+
# 0.7.0
|
| 639 |
+
- Implement the Extend trait ([#49])
|
| 640 |
+
- Allow definitions inside the `bitflags!` macro to refer to items imported from other modules ([#51])
|
| 641 |
+
|
| 642 |
+
[#49]: https://github.com/rust-lang-nursery/bitflags/pull/49
|
| 643 |
+
[#51]: https://github.com/rust-lang-nursery/bitflags/pull/51
|
| 644 |
+
|
| 645 |
+
# 0.6.0
|
| 646 |
+
- The `no_std` feature was removed as it is now the default
|
| 647 |
+
- The `assignment_operators` feature was remove as it is now enabled by default
|
| 648 |
+
- Some clippy suggestions have been applied
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Contributor Covenant Code of Conduct
|
| 2 |
+
|
| 3 |
+
## Our Pledge
|
| 4 |
+
|
| 5 |
+
In the interest of fostering an open and welcoming environment, we as
|
| 6 |
+
contributors and maintainers pledge to making participation in our project and
|
| 7 |
+
our community a harassment-free experience for everyone, regardless of age, body
|
| 8 |
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
| 9 |
+
education, socio-economic status, nationality, personal appearance, race,
|
| 10 |
+
religion, or sexual identity and orientation.
|
| 11 |
+
|
| 12 |
+
## Our Standards
|
| 13 |
+
|
| 14 |
+
Examples of behavior that contributes to creating a positive environment
|
| 15 |
+
include:
|
| 16 |
+
|
| 17 |
+
* Using welcoming and inclusive language
|
| 18 |
+
* Being respectful of differing viewpoints and experiences
|
| 19 |
+
* Gracefully accepting constructive criticism
|
| 20 |
+
* Focusing on what is best for the community
|
| 21 |
+
* Showing empathy towards other community members
|
| 22 |
+
|
| 23 |
+
Examples of unacceptable behavior by participants include:
|
| 24 |
+
|
| 25 |
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
| 26 |
+
advances
|
| 27 |
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
| 28 |
+
* Public or private harassment
|
| 29 |
+
* Publishing others' private information, such as a physical or electronic
|
| 30 |
+
address, without explicit permission
|
| 31 |
+
* Other conduct which could reasonably be considered inappropriate in a
|
| 32 |
+
professional setting
|
| 33 |
+
|
| 34 |
+
## Our Responsibilities
|
| 35 |
+
|
| 36 |
+
Project maintainers are responsible for clarifying the standards of acceptable
|
| 37 |
+
behavior and are expected to take appropriate and fair corrective action in
|
| 38 |
+
response to any instances of unacceptable behavior.
|
| 39 |
+
|
| 40 |
+
Project maintainers have the right and responsibility to remove, edit, or
|
| 41 |
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
| 42 |
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
| 43 |
+
permanently any contributor for other behaviors that they deem inappropriate,
|
| 44 |
+
threatening, offensive, or harmful.
|
| 45 |
+
|
| 46 |
+
## Scope
|
| 47 |
+
|
| 48 |
+
This Code of Conduct applies both within project spaces and in public spaces
|
| 49 |
+
when an individual is representing the project or its community. Examples of
|
| 50 |
+
representing a project or community include using an official project e-mail
|
| 51 |
+
address, posting via an official social media account, or acting as an appointed
|
| 52 |
+
representative at an online or offline event. Representation of a project may be
|
| 53 |
+
further defined and clarified by project maintainers.
|
| 54 |
+
|
| 55 |
+
## Enforcement
|
| 56 |
+
|
| 57 |
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
| 58 |
+
reported by contacting the project team at coc@senaite.org. All
|
| 59 |
+
complaints will be reviewed and investigated and will result in a response that
|
| 60 |
+
is deemed necessary and appropriate to the circumstances. The project team is
|
| 61 |
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
| 62 |
+
Further details of specific enforcement policies may be posted separately.
|
| 63 |
+
|
| 64 |
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
| 65 |
+
faith may face temporary or permanent repercussions as determined by other
|
| 66 |
+
members of the project's leadership.
|
| 67 |
+
|
| 68 |
+
## Attribution
|
| 69 |
+
|
| 70 |
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
| 71 |
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
| 72 |
+
|
| 73 |
+
[homepage]: https://www.contributor-covenant.org
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Updating compile-fail test outputs
|
| 2 |
+
|
| 3 |
+
`bitflags` uses the `trybuild` crate to integration test its macros. Since Rust error messages change frequently enough that `nightly` builds produce spurious failures, we only check the compiler output in `beta` builds. If you run:
|
| 4 |
+
|
| 5 |
+
```
|
| 6 |
+
TRYBUILD=overwrite cargo +beta test --all
|
| 7 |
+
```
|
| 8 |
+
|
| 9 |
+
it will run the tests and update the `trybuild` output files.
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/Cargo.lock
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is automatically @generated by Cargo.
|
| 2 |
+
# It is not intended for manual editing.
|
| 3 |
+
version = 3
|
| 4 |
+
|
| 5 |
+
[[package]]
|
| 6 |
+
name = "arbitrary"
|
| 7 |
+
version = "1.4.2"
|
| 8 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 9 |
+
checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"
|
| 10 |
+
dependencies = [
|
| 11 |
+
"derive_arbitrary",
|
| 12 |
+
]
|
| 13 |
+
|
| 14 |
+
[[package]]
|
| 15 |
+
name = "bitflags"
|
| 16 |
+
version = "2.11.0"
|
| 17 |
+
dependencies = [
|
| 18 |
+
"arbitrary",
|
| 19 |
+
"bytemuck",
|
| 20 |
+
"rustversion",
|
| 21 |
+
"serde",
|
| 22 |
+
"serde_core",
|
| 23 |
+
"serde_json",
|
| 24 |
+
"serde_test",
|
| 25 |
+
"trybuild",
|
| 26 |
+
"zerocopy",
|
| 27 |
+
]
|
| 28 |
+
|
| 29 |
+
[[package]]
|
| 30 |
+
name = "bytemuck"
|
| 31 |
+
version = "1.25.0"
|
| 32 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 33 |
+
checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec"
|
| 34 |
+
dependencies = [
|
| 35 |
+
"bytemuck_derive",
|
| 36 |
+
]
|
| 37 |
+
|
| 38 |
+
[[package]]
|
| 39 |
+
name = "bytemuck_derive"
|
| 40 |
+
version = "1.10.2"
|
| 41 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 42 |
+
checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff"
|
| 43 |
+
dependencies = [
|
| 44 |
+
"proc-macro2",
|
| 45 |
+
"quote",
|
| 46 |
+
"syn",
|
| 47 |
+
]
|
| 48 |
+
|
| 49 |
+
[[package]]
|
| 50 |
+
name = "derive_arbitrary"
|
| 51 |
+
version = "1.4.2"
|
| 52 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 53 |
+
checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a"
|
| 54 |
+
dependencies = [
|
| 55 |
+
"proc-macro2",
|
| 56 |
+
"quote",
|
| 57 |
+
"syn",
|
| 58 |
+
]
|
| 59 |
+
|
| 60 |
+
[[package]]
|
| 61 |
+
name = "equivalent"
|
| 62 |
+
version = "1.0.2"
|
| 63 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 64 |
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
| 65 |
+
|
| 66 |
+
[[package]]
|
| 67 |
+
name = "glob"
|
| 68 |
+
version = "0.3.3"
|
| 69 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 70 |
+
checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
|
| 71 |
+
|
| 72 |
+
[[package]]
|
| 73 |
+
name = "hashbrown"
|
| 74 |
+
version = "0.16.1"
|
| 75 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 76 |
+
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
|
| 77 |
+
|
| 78 |
+
[[package]]
|
| 79 |
+
name = "indexmap"
|
| 80 |
+
version = "2.13.0"
|
| 81 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 82 |
+
checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
|
| 83 |
+
dependencies = [
|
| 84 |
+
"equivalent",
|
| 85 |
+
"hashbrown",
|
| 86 |
+
]
|
| 87 |
+
|
| 88 |
+
[[package]]
|
| 89 |
+
name = "itoa"
|
| 90 |
+
version = "1.0.17"
|
| 91 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 92 |
+
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
|
| 93 |
+
|
| 94 |
+
[[package]]
|
| 95 |
+
name = "memchr"
|
| 96 |
+
version = "2.8.0"
|
| 97 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 98 |
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
| 99 |
+
|
| 100 |
+
[[package]]
|
| 101 |
+
name = "proc-macro2"
|
| 102 |
+
version = "1.0.106"
|
| 103 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 104 |
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
| 105 |
+
dependencies = [
|
| 106 |
+
"unicode-ident",
|
| 107 |
+
]
|
| 108 |
+
|
| 109 |
+
[[package]]
|
| 110 |
+
name = "quote"
|
| 111 |
+
version = "1.0.44"
|
| 112 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 113 |
+
checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
|
| 114 |
+
dependencies = [
|
| 115 |
+
"proc-macro2",
|
| 116 |
+
]
|
| 117 |
+
|
| 118 |
+
[[package]]
|
| 119 |
+
name = "rustversion"
|
| 120 |
+
version = "1.0.22"
|
| 121 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 122 |
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
| 123 |
+
|
| 124 |
+
[[package]]
|
| 125 |
+
name = "serde"
|
| 126 |
+
version = "1.0.228"
|
| 127 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 128 |
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
| 129 |
+
dependencies = [
|
| 130 |
+
"serde_core",
|
| 131 |
+
"serde_derive",
|
| 132 |
+
]
|
| 133 |
+
|
| 134 |
+
[[package]]
|
| 135 |
+
name = "serde_core"
|
| 136 |
+
version = "1.0.228"
|
| 137 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 138 |
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
| 139 |
+
dependencies = [
|
| 140 |
+
"serde_derive",
|
| 141 |
+
]
|
| 142 |
+
|
| 143 |
+
[[package]]
|
| 144 |
+
name = "serde_derive"
|
| 145 |
+
version = "1.0.228"
|
| 146 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 147 |
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
| 148 |
+
dependencies = [
|
| 149 |
+
"proc-macro2",
|
| 150 |
+
"quote",
|
| 151 |
+
"syn",
|
| 152 |
+
]
|
| 153 |
+
|
| 154 |
+
[[package]]
|
| 155 |
+
name = "serde_json"
|
| 156 |
+
version = "1.0.149"
|
| 157 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 158 |
+
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
| 159 |
+
dependencies = [
|
| 160 |
+
"itoa",
|
| 161 |
+
"memchr",
|
| 162 |
+
"serde",
|
| 163 |
+
"serde_core",
|
| 164 |
+
"zmij",
|
| 165 |
+
]
|
| 166 |
+
|
| 167 |
+
[[package]]
|
| 168 |
+
name = "serde_spanned"
|
| 169 |
+
version = "1.0.4"
|
| 170 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 171 |
+
checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776"
|
| 172 |
+
dependencies = [
|
| 173 |
+
"serde_core",
|
| 174 |
+
]
|
| 175 |
+
|
| 176 |
+
[[package]]
|
| 177 |
+
name = "serde_test"
|
| 178 |
+
version = "1.0.177"
|
| 179 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 180 |
+
checksum = "7f901ee573cab6b3060453d2d5f0bae4e6d628c23c0a962ff9b5f1d7c8d4f1ed"
|
| 181 |
+
dependencies = [
|
| 182 |
+
"serde",
|
| 183 |
+
]
|
| 184 |
+
|
| 185 |
+
[[package]]
|
| 186 |
+
name = "syn"
|
| 187 |
+
version = "2.0.115"
|
| 188 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 189 |
+
checksum = "6e614ed320ac28113fa64972c4262d5dbc89deacdfd00c34a3e4cea073243c12"
|
| 190 |
+
dependencies = [
|
| 191 |
+
"proc-macro2",
|
| 192 |
+
"quote",
|
| 193 |
+
"unicode-ident",
|
| 194 |
+
]
|
| 195 |
+
|
| 196 |
+
[[package]]
|
| 197 |
+
name = "target-triple"
|
| 198 |
+
version = "1.0.0"
|
| 199 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 200 |
+
checksum = "591ef38edfb78ca4771ee32cf494cb8771944bee237a9b91fc9c1424ac4b777b"
|
| 201 |
+
|
| 202 |
+
[[package]]
|
| 203 |
+
name = "termcolor"
|
| 204 |
+
version = "1.4.1"
|
| 205 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 206 |
+
checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
|
| 207 |
+
dependencies = [
|
| 208 |
+
"winapi-util",
|
| 209 |
+
]
|
| 210 |
+
|
| 211 |
+
[[package]]
|
| 212 |
+
name = "toml"
|
| 213 |
+
version = "1.0.1+spec-1.1.0"
|
| 214 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 215 |
+
checksum = "bbe30f93627849fa362d4a602212d41bb237dc2bd0f8ba0b2ce785012e124220"
|
| 216 |
+
dependencies = [
|
| 217 |
+
"indexmap",
|
| 218 |
+
"serde_core",
|
| 219 |
+
"serde_spanned",
|
| 220 |
+
"toml_datetime",
|
| 221 |
+
"toml_parser",
|
| 222 |
+
"toml_writer",
|
| 223 |
+
"winnow",
|
| 224 |
+
]
|
| 225 |
+
|
| 226 |
+
[[package]]
|
| 227 |
+
name = "toml_datetime"
|
| 228 |
+
version = "1.0.0+spec-1.1.0"
|
| 229 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 230 |
+
checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e"
|
| 231 |
+
dependencies = [
|
| 232 |
+
"serde_core",
|
| 233 |
+
]
|
| 234 |
+
|
| 235 |
+
[[package]]
|
| 236 |
+
name = "toml_parser"
|
| 237 |
+
version = "1.0.8+spec-1.1.0"
|
| 238 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 239 |
+
checksum = "0742ff5ff03ea7e67c8ae6c93cac239e0d9784833362da3f9a9c1da8dfefcbdc"
|
| 240 |
+
dependencies = [
|
| 241 |
+
"winnow",
|
| 242 |
+
]
|
| 243 |
+
|
| 244 |
+
[[package]]
|
| 245 |
+
name = "toml_writer"
|
| 246 |
+
version = "1.0.6+spec-1.1.0"
|
| 247 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 248 |
+
checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607"
|
| 249 |
+
|
| 250 |
+
[[package]]
|
| 251 |
+
name = "trybuild"
|
| 252 |
+
version = "1.0.116"
|
| 253 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 254 |
+
checksum = "47c635f0191bd3a2941013e5062667100969f8c4e9cd787c14f977265d73616e"
|
| 255 |
+
dependencies = [
|
| 256 |
+
"glob",
|
| 257 |
+
"serde",
|
| 258 |
+
"serde_derive",
|
| 259 |
+
"serde_json",
|
| 260 |
+
"target-triple",
|
| 261 |
+
"termcolor",
|
| 262 |
+
"toml",
|
| 263 |
+
]
|
| 264 |
+
|
| 265 |
+
[[package]]
|
| 266 |
+
name = "unicode-ident"
|
| 267 |
+
version = "1.0.23"
|
| 268 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 269 |
+
checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
|
| 270 |
+
|
| 271 |
+
[[package]]
|
| 272 |
+
name = "winapi-util"
|
| 273 |
+
version = "0.1.11"
|
| 274 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 275 |
+
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
| 276 |
+
dependencies = [
|
| 277 |
+
"windows-sys",
|
| 278 |
+
]
|
| 279 |
+
|
| 280 |
+
[[package]]
|
| 281 |
+
name = "windows-link"
|
| 282 |
+
version = "0.2.1"
|
| 283 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 284 |
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
| 285 |
+
|
| 286 |
+
[[package]]
|
| 287 |
+
name = "windows-sys"
|
| 288 |
+
version = "0.61.2"
|
| 289 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 290 |
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
| 291 |
+
dependencies = [
|
| 292 |
+
"windows-link",
|
| 293 |
+
]
|
| 294 |
+
|
| 295 |
+
[[package]]
|
| 296 |
+
name = "winnow"
|
| 297 |
+
version = "0.7.14"
|
| 298 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 299 |
+
checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829"
|
| 300 |
+
|
| 301 |
+
[[package]]
|
| 302 |
+
name = "zerocopy"
|
| 303 |
+
version = "0.8.39"
|
| 304 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 305 |
+
checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a"
|
| 306 |
+
dependencies = [
|
| 307 |
+
"zerocopy-derive",
|
| 308 |
+
]
|
| 309 |
+
|
| 310 |
+
[[package]]
|
| 311 |
+
name = "zerocopy-derive"
|
| 312 |
+
version = "0.8.39"
|
| 313 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 314 |
+
checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517"
|
| 315 |
+
dependencies = [
|
| 316 |
+
"proc-macro2",
|
| 317 |
+
"quote",
|
| 318 |
+
"syn",
|
| 319 |
+
]
|
| 320 |
+
|
| 321 |
+
[[package]]
|
| 322 |
+
name = "zmij"
|
| 323 |
+
version = "1.0.21"
|
| 324 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 325 |
+
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/Cargo.toml
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
| 2 |
+
#
|
| 3 |
+
# When uploading crates to the registry Cargo will automatically
|
| 4 |
+
# "normalize" Cargo.toml files for maximal compatibility
|
| 5 |
+
# with all versions of Cargo and also rewrite `path` dependencies
|
| 6 |
+
# to registry (e.g., crates.io) dependencies.
|
| 7 |
+
#
|
| 8 |
+
# If you are reading this file be aware that the original Cargo.toml
|
| 9 |
+
# will likely look very different (and much more reasonable).
|
| 10 |
+
# See Cargo.toml.orig for the original contents.
|
| 11 |
+
|
| 12 |
+
[package]
|
| 13 |
+
edition = "2021"
|
| 14 |
+
rust-version = "1.56.0"
|
| 15 |
+
name = "bitflags"
|
| 16 |
+
version = "2.11.0"
|
| 17 |
+
authors = ["The Rust Project Developers"]
|
| 18 |
+
build = false
|
| 19 |
+
exclude = [
|
| 20 |
+
"/tests",
|
| 21 |
+
"/.github",
|
| 22 |
+
]
|
| 23 |
+
autolib = false
|
| 24 |
+
autobins = false
|
| 25 |
+
autoexamples = false
|
| 26 |
+
autotests = false
|
| 27 |
+
autobenches = false
|
| 28 |
+
description = """
|
| 29 |
+
A macro to generate structures which behave like bitflags.
|
| 30 |
+
"""
|
| 31 |
+
homepage = "https://github.com/bitflags/bitflags"
|
| 32 |
+
documentation = "https://docs.rs/bitflags"
|
| 33 |
+
readme = "README.md"
|
| 34 |
+
keywords = [
|
| 35 |
+
"bit",
|
| 36 |
+
"bitmask",
|
| 37 |
+
"bitflags",
|
| 38 |
+
"flags",
|
| 39 |
+
]
|
| 40 |
+
categories = ["no-std"]
|
| 41 |
+
license = "MIT OR Apache-2.0"
|
| 42 |
+
repository = "https://github.com/bitflags/bitflags"
|
| 43 |
+
|
| 44 |
+
[package.metadata.docs.rs]
|
| 45 |
+
features = ["example_generated"]
|
| 46 |
+
|
| 47 |
+
[features]
|
| 48 |
+
example_generated = []
|
| 49 |
+
serde = ["serde_core"]
|
| 50 |
+
std = []
|
| 51 |
+
|
| 52 |
+
[lib]
|
| 53 |
+
name = "bitflags"
|
| 54 |
+
path = "src/lib.rs"
|
| 55 |
+
|
| 56 |
+
[[example]]
|
| 57 |
+
name = "custom_bits_type"
|
| 58 |
+
path = "examples/custom_bits_type.rs"
|
| 59 |
+
|
| 60 |
+
[[example]]
|
| 61 |
+
name = "custom_derive"
|
| 62 |
+
path = "examples/custom_derive.rs"
|
| 63 |
+
|
| 64 |
+
[[example]]
|
| 65 |
+
name = "fmt"
|
| 66 |
+
path = "examples/fmt.rs"
|
| 67 |
+
|
| 68 |
+
[[example]]
|
| 69 |
+
name = "macro_free"
|
| 70 |
+
path = "examples/macro_free.rs"
|
| 71 |
+
|
| 72 |
+
[[example]]
|
| 73 |
+
name = "serde"
|
| 74 |
+
path = "examples/serde.rs"
|
| 75 |
+
|
| 76 |
+
[[bench]]
|
| 77 |
+
name = "parse"
|
| 78 |
+
path = "benches/parse.rs"
|
| 79 |
+
|
| 80 |
+
[dependencies.arbitrary]
|
| 81 |
+
version = "1.0"
|
| 82 |
+
optional = true
|
| 83 |
+
|
| 84 |
+
[dependencies.bytemuck]
|
| 85 |
+
version = "1.12"
|
| 86 |
+
optional = true
|
| 87 |
+
|
| 88 |
+
[dependencies.serde_core]
|
| 89 |
+
version = "1.0.228"
|
| 90 |
+
optional = true
|
| 91 |
+
default-features = false
|
| 92 |
+
|
| 93 |
+
[dev-dependencies.arbitrary]
|
| 94 |
+
version = "1.0"
|
| 95 |
+
features = ["derive"]
|
| 96 |
+
|
| 97 |
+
[dev-dependencies.bytemuck]
|
| 98 |
+
version = "1.12.2"
|
| 99 |
+
features = ["derive"]
|
| 100 |
+
|
| 101 |
+
[dev-dependencies.rustversion]
|
| 102 |
+
version = "1.0"
|
| 103 |
+
|
| 104 |
+
[dev-dependencies.serde_json]
|
| 105 |
+
version = "1.0"
|
| 106 |
+
|
| 107 |
+
[dev-dependencies.serde_lib]
|
| 108 |
+
version = "1.0.103"
|
| 109 |
+
features = ["derive"]
|
| 110 |
+
package = "serde"
|
| 111 |
+
|
| 112 |
+
[dev-dependencies.serde_test]
|
| 113 |
+
version = "1.0.19"
|
| 114 |
+
|
| 115 |
+
[dev-dependencies.trybuild]
|
| 116 |
+
version = "1.0.18"
|
| 117 |
+
|
| 118 |
+
[dev-dependencies.zerocopy]
|
| 119 |
+
version = "0.8"
|
| 120 |
+
features = ["derive"]
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/Cargo.toml.orig
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[package]
|
| 2 |
+
name = "bitflags"
|
| 3 |
+
# NB: When modifying, also modify the number in readme (for breaking changes)
|
| 4 |
+
version = "2.11.0"
|
| 5 |
+
edition = "2021"
|
| 6 |
+
rust-version = "1.56.0"
|
| 7 |
+
authors = ["The Rust Project Developers"]
|
| 8 |
+
license = "MIT OR Apache-2.0"
|
| 9 |
+
keywords = ["bit", "bitmask", "bitflags", "flags"]
|
| 10 |
+
readme = "README.md"
|
| 11 |
+
repository = "https://github.com/bitflags/bitflags"
|
| 12 |
+
homepage = "https://github.com/bitflags/bitflags"
|
| 13 |
+
documentation = "https://docs.rs/bitflags"
|
| 14 |
+
categories = ["no-std"]
|
| 15 |
+
description = """
|
| 16 |
+
A macro to generate structures which behave like bitflags.
|
| 17 |
+
"""
|
| 18 |
+
exclude = ["/tests", "/.github"]
|
| 19 |
+
|
| 20 |
+
[dependencies]
|
| 21 |
+
serde_core = { version = "1.0.228", optional = true, default-features = false }
|
| 22 |
+
arbitrary = { version = "1.0", optional = true }
|
| 23 |
+
bytemuck = { version = "1.12", optional = true }
|
| 24 |
+
|
| 25 |
+
[dev-dependencies]
|
| 26 |
+
trybuild = "1.0.18"
|
| 27 |
+
rustversion = "1.0"
|
| 28 |
+
serde_json = "1.0"
|
| 29 |
+
serde_test = "1.0.19"
|
| 30 |
+
serde_lib = { version = "1.0.103", features = ["derive"], package = "serde" }
|
| 31 |
+
zerocopy = { version = "0.8", features = ["derive"] }
|
| 32 |
+
arbitrary = { version = "1.0", features = ["derive"] }
|
| 33 |
+
bytemuck = { version = "1.12.2", features = ["derive"] }
|
| 34 |
+
|
| 35 |
+
[features]
|
| 36 |
+
std = []
|
| 37 |
+
serde = ["serde_core"]
|
| 38 |
+
example_generated = []
|
| 39 |
+
|
| 40 |
+
[package.metadata.docs.rs]
|
| 41 |
+
features = ["example_generated"]
|
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.11.0/LICENSE-APACHE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright [yyyy] [name of copyright owner]
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|