mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1403048 - Update Rust deps for audioipc. r=kamidphish,rillian
--HG-- extra : rebase_source : a9765e844b818a84cfa2ce69b525a7a2ed72c6de
This commit is contained in:
parent
6e690e73d3
commit
3bf2f6de54
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"323ff5358cf140e4d815e6f7563efdeffce840fa3394ead82839fdd8b02a6689","README.md":"cf602fdefd59881da22ea4f7a8db2cfa94e6e03cd9afb4fbf838143e1ca2c194","build.rs":"e063024318a8d117756b5a58dfb3a21d872ab9ba3c8762906f773ddc53eae45a","src/lib.rs":"6de786f2f5b1a1fcb0123086845bfeab7b012a600920862ff98dbacf67f3947a"},"package":"307c92332867e586720c0222ee9d890bbe8431711efed8a1b06bc5b40fc66bd7"}
|
||||
{"files":{"Cargo.toml":"323ff5358cf140e4d815e6f7563efdeffce840fa3394ead82839fdd8b02a6689","README.md":"cf602fdefd59881da22ea4f7a8db2cfa94e6e03cd9afb4fbf838143e1ca2c194","build.rs":"e063024318a8d117756b5a58dfb3a21d872ab9ba3c8762906f773ddc53eae45a","src/lib.rs":"6de786f2f5b1a1fcb0123086845bfeab7b012a600920862ff98dbacf67f3947a"},"package":"307c92332867e586720c0222ee9d890bbe8431711efed8a1b06bc5b40fc66bd7"}
|
0
third_party/rust/advapi32-sys/.cargo-ok
vendored
0
third_party/rust/advapi32-sys/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"e17babe5ba0bdd19ec59a37b4a099fd4313bff58be63a2ff506075f9a97dc172","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"367c53caf576e1c811c77b5234f4d00ee23f5b1052d5e11bdc0c3153a8d9ae82","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","Makefile":"a45a128685a2ae7d4fa39d310786674417ee113055ef290a11f88002285865fc","README.md":"9bc60d2cec222b50f87c85cf9475349bb228a36f89796c5d6481c52560ddde3a","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","benches/bench.rs":"acf4844efadeafc7bc396c2b16f2a184e140b6c17d1084dbaf454196de2090cd","benches/random.txt":"9386fb3efedc7ffbd09fb49088347f1056bc2d90a861009fa2f804cdb714efcb","ctags.rust":"3d128d3cc59f702e68953ba2fe6c3f46bc6991fc575308db060482d5da0c79f3","examples/dict-search.rs":"30eb44b1a0b599507db4c23a90f74199faabc64a8ae1d603ecdf3bba7428eb1e","session.vim":"95cb1d7caf0ff7fbe76ec911988d908ddd883381c925ba64b537695bc9f021c4","src/autiter.rs":"dc8817af24825c356842c814d771868fb07b6965addf4780e8b9dea9718344a0","src/full.rs":"b83a9c8ff3ef611c316b68650915df2d7f361a49b59dab103dc2c5476f2d8303","src/lib.rs":"68bf2ed02d58bebee6f7f7579038f1e4b60a2c4acc334263cb837bcbe15ffe94","src/main.rs":"fc867cb5f0b02d0f49ecab06b72c05a247cbcf3bf9228c235de8e787bda7bef5"},"package":"0638fd549427caa90c499814196d1b9e3725eb4d15d7339d6de073a680ed0ca2"}
|
||||
{"files":{".travis.yml":"e17babe5ba0bdd19ec59a37b4a099fd4313bff58be63a2ff506075f9a97dc172","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"367c53caf576e1c811c77b5234f4d00ee23f5b1052d5e11bdc0c3153a8d9ae82","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","Makefile":"a45a128685a2ae7d4fa39d310786674417ee113055ef290a11f88002285865fc","README.md":"9bc60d2cec222b50f87c85cf9475349bb228a36f89796c5d6481c52560ddde3a","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","benches/bench.rs":"acf4844efadeafc7bc396c2b16f2a184e140b6c17d1084dbaf454196de2090cd","benches/random.txt":"9386fb3efedc7ffbd09fb49088347f1056bc2d90a861009fa2f804cdb714efcb","ctags.rust":"3d128d3cc59f702e68953ba2fe6c3f46bc6991fc575308db060482d5da0c79f3","examples/dict-search.rs":"30eb44b1a0b599507db4c23a90f74199faabc64a8ae1d603ecdf3bba7428eb1e","session.vim":"95cb1d7caf0ff7fbe76ec911988d908ddd883381c925ba64b537695bc9f021c4","src/autiter.rs":"dc8817af24825c356842c814d771868fb07b6965addf4780e8b9dea9718344a0","src/full.rs":"b83a9c8ff3ef611c316b68650915df2d7f361a49b59dab103dc2c5476f2d8303","src/lib.rs":"68bf2ed02d58bebee6f7f7579038f1e4b60a2c4acc334263cb837bcbe15ffe94","src/main.rs":"fc867cb5f0b02d0f49ecab06b72c05a247cbcf3bf9228c235de8e787bda7bef5"},"package":"0638fd549427caa90c499814196d1b9e3725eb4d15d7339d6de073a680ed0ca2"}
|
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"e17babe5ba0bdd19ec59a37b4a099fd4313bff58be63a2ff506075f9a97dc172","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"b3fa06c2147a4749cd984ded69024ddcc8b7d578ab763b60227b3ba474c3ec70","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","Makefile":"a45a128685a2ae7d4fa39d310786674417ee113055ef290a11f88002285865fc","README.md":"9bc60d2cec222b50f87c85cf9475349bb228a36f89796c5d6481c52560ddde3a","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","benches/bench.rs":"acf4844efadeafc7bc396c2b16f2a184e140b6c17d1084dbaf454196de2090cd","benches/random.txt":"9386fb3efedc7ffbd09fb49088347f1056bc2d90a861009fa2f804cdb714efcb","ctags.rust":"3d128d3cc59f702e68953ba2fe6c3f46bc6991fc575308db060482d5da0c79f3","examples/dict-search.rs":"30eb44b1a0b599507db4c23a90f74199faabc64a8ae1d603ecdf3bba7428eb1e","session.vim":"95cb1d7caf0ff7fbe76ec911988d908ddd883381c925ba64b537695bc9f021c4","src/autiter.rs":"98c31a7fbe21cfacaa858f90409f0d86edd46dda1b7651f4e800d929a50afb7b","src/full.rs":"b83a9c8ff3ef611c316b68650915df2d7f361a49b59dab103dc2c5476f2d8303","src/lib.rs":"68bf2ed02d58bebee6f7f7579038f1e4b60a2c4acc334263cb837bcbe15ffe94","src/main.rs":"fc867cb5f0b02d0f49ecab06b72c05a247cbcf3bf9228c235de8e787bda7bef5"},"package":"500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"}
|
||||
{"files":{".travis.yml":"e17babe5ba0bdd19ec59a37b4a099fd4313bff58be63a2ff506075f9a97dc172","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"b3fa06c2147a4749cd984ded69024ddcc8b7d578ab763b60227b3ba474c3ec70","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","Makefile":"a45a128685a2ae7d4fa39d310786674417ee113055ef290a11f88002285865fc","README.md":"9bc60d2cec222b50f87c85cf9475349bb228a36f89796c5d6481c52560ddde3a","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","benches/bench.rs":"acf4844efadeafc7bc396c2b16f2a184e140b6c17d1084dbaf454196de2090cd","benches/random.txt":"9386fb3efedc7ffbd09fb49088347f1056bc2d90a861009fa2f804cdb714efcb","ctags.rust":"3d128d3cc59f702e68953ba2fe6c3f46bc6991fc575308db060482d5da0c79f3","examples/dict-search.rs":"30eb44b1a0b599507db4c23a90f74199faabc64a8ae1d603ecdf3bba7428eb1e","session.vim":"95cb1d7caf0ff7fbe76ec911988d908ddd883381c925ba64b537695bc9f021c4","src/autiter.rs":"98c31a7fbe21cfacaa858f90409f0d86edd46dda1b7651f4e800d929a50afb7b","src/full.rs":"b83a9c8ff3ef611c316b68650915df2d7f361a49b59dab103dc2c5476f2d8303","src/lib.rs":"68bf2ed02d58bebee6f7f7579038f1e4b60a2c4acc334263cb837bcbe15ffe94","src/main.rs":"fc867cb5f0b02d0f49ecab06b72c05a247cbcf3bf9228c235de8e787bda7bef5"},"package":"500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"}
|
0
third_party/rust/aho-corasick/.cargo-ok
vendored
0
third_party/rust/aho-corasick/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"eb7113e5f5e36c2e00ae8e88a84dd5273505036520f2787133ba575d5fdd93c1","Cargo.toml":"ffe01d108855864ea3c975aad9da22d2a2324730022a5d4e119639f5850209db","LICENCE":"2762990c7fbba9d550802a2593c1d857dcd52596bb0f9f192a97e9a7ac5f4f9e","README.md":"ee22a0db93788e9bfe4c3cf4d7df5daf881a3105f941a915140a34018ff394e5","src/lib.rs":"867242d0699126af5a115709030888e958edfb835a0b3c15c4159a045f367e18"},"package":"23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"}
|
||||
{"files":{".travis.yml":"eb7113e5f5e36c2e00ae8e88a84dd5273505036520f2787133ba575d5fdd93c1","Cargo.toml":"ffe01d108855864ea3c975aad9da22d2a2324730022a5d4e119639f5850209db","LICENCE":"2762990c7fbba9d550802a2593c1d857dcd52596bb0f9f192a97e9a7ac5f4f9e","README.md":"ee22a0db93788e9bfe4c3cf4d7df5daf881a3105f941a915140a34018ff394e5","src/lib.rs":"867242d0699126af5a115709030888e958edfb835a0b3c15c4159a045f367e18"},"package":"23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"}
|
0
third_party/rust/ansi_term/.cargo-ok
vendored
0
third_party/rust/ansi_term/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"6b96b2c6bfd7e1acef4b825a2813fc4277859eb9400a16800db8835c25e4087d","Cargo.toml":"41d47153a6043d3e4599f827888e1ac43c204e52ed5f6998b1e275fcae21a3cc","README.md":"9f048d969f9f8333cdcdb892744cd0816e4f2922c8817fa5e9e07f9472fe1050","src/app_unit.rs":"0f4fde2c0481b6dd021f48c8ef548090e7c577c02c429c41626c2b5e7a006949","src/lib.rs":"2df7d863c47d8b22f9af66caeafa87e6a206ee713a8aeaa55c5a80a42a92513b"},"package":"ed0a4de09a3b8449515e649f3bb84f72ea15fc2d10639beb0776a09b7d308074"}
|
||||
{"files":{".travis.yml":"6b96b2c6bfd7e1acef4b825a2813fc4277859eb9400a16800db8835c25e4087d","Cargo.toml":"41d47153a6043d3e4599f827888e1ac43c204e52ed5f6998b1e275fcae21a3cc","README.md":"9f048d969f9f8333cdcdb892744cd0816e4f2922c8817fa5e9e07f9472fe1050","src/app_unit.rs":"0f4fde2c0481b6dd021f48c8ef548090e7c577c02c429c41626c2b5e7a006949","src/lib.rs":"2df7d863c47d8b22f9af66caeafa87e6a206ee713a8aeaa55c5a80a42a92513b"},"package":"ed0a4de09a3b8449515e649f3bb84f72ea15fc2d10639beb0776a09b7d308074"}
|
0
third_party/rust/app_units/.cargo-ok
vendored
0
third_party/rust/app_units/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"23504e7dd0d6950739f589a435d468150b0d622bc8a88d5081d82117763422c5","Cargo.toml":"2cf7ac51721bf5180a63e87bed7a8f2ec9303523230efdfb95cdc5b51da502f3","LICENSE":"c3f6a6243c9101744bc87de3376336ca55dcbfc4b3c62c70c4e7b735b792266c","Makefile":"2130e4879c185e1ef8e40e0f9d54e1a1cbc8160e2957076b947e79e4df84fd73","README.rst":"cc9b7337e517729f7a12f2639feb60cb49534fd0ccefd60bf039f26b3fb64b70","custom.css":"e6f2cd299392337b4e2959c52f422e5b7be11920ea98d10db44d10ddef5ed47c","src/array.rs":"10b95a278d0e83ed26bb7ed5b84babb03e77436404e6215e11eb9a252e05287e","src/array_string.rs":"261a55a20007fbec6008151fce2fa380af6ade95008ab71b4f0f0bc9625000c2","src/lib.rs":"2ba25ccca0fc5fc935092fa2930f74b650ce9cdc01ac2243cbebf11d376715f5","tests/generic_array.rs":"f1b56aab333f74bd3d7db90f03bbb6bb7495206fc3461a0d25a03f75f4988041","tests/tests.rs":"a143113a7f1db16bd75e8c6b540ae826114fb17213e2415cf75d133015951934"},"package":"699e63a93b79d717e8c3b5eb1b28b7780d0d6d9e59a72eb769291c83b0c8dc67"}
|
||||
{"files":{".travis.yml":"23504e7dd0d6950739f589a435d468150b0d622bc8a88d5081d82117763422c5","Cargo.toml":"2cf7ac51721bf5180a63e87bed7a8f2ec9303523230efdfb95cdc5b51da502f3","LICENSE":"c3f6a6243c9101744bc87de3376336ca55dcbfc4b3c62c70c4e7b735b792266c","Makefile":"2130e4879c185e1ef8e40e0f9d54e1a1cbc8160e2957076b947e79e4df84fd73","README.rst":"cc9b7337e517729f7a12f2639feb60cb49534fd0ccefd60bf039f26b3fb64b70","custom.css":"e6f2cd299392337b4e2959c52f422e5b7be11920ea98d10db44d10ddef5ed47c","src/array.rs":"10b95a278d0e83ed26bb7ed5b84babb03e77436404e6215e11eb9a252e05287e","src/array_string.rs":"261a55a20007fbec6008151fce2fa380af6ade95008ab71b4f0f0bc9625000c2","src/lib.rs":"2ba25ccca0fc5fc935092fa2930f74b650ce9cdc01ac2243cbebf11d376715f5","tests/generic_array.rs":"f1b56aab333f74bd3d7db90f03bbb6bb7495206fc3461a0d25a03f75f4988041","tests/tests.rs":"a143113a7f1db16bd75e8c6b540ae826114fb17213e2415cf75d133015951934"},"package":"699e63a93b79d717e8c3b5eb1b28b7780d0d6d9e59a72eb769291c83b0c8dc67"}
|
0
third_party/rust/arrayvec/.cargo-ok
vendored
0
third_party/rust/arrayvec/.cargo-ok
vendored
2
third_party/rust/aster/.cargo-checksum.json
vendored
2
third_party/rust/aster/.cargo-checksum.json
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"687fdaee594caaf4e71f43436f1ad56ede33916858eda1dbd1996ead64e1434e","src/arm.rs":"83b6ba22ded921ae45e02888e879b2ae73d4659db53e6552675433c3c2e0ed21","src/attr.rs":"7c6d6ff66cfbfa23e5857192db1c7e97c3b2826f4434ea7bd5d4b1ded1fe8b5e","src/block.rs":"71e2268ba151b7ee60a2fe0b0b3a7cf3e2ce3bff4fb0ee260db70ad9b1cd8826","src/constant.rs":"471b0ffc52684733a598a43e08b1719bf6852c26eca74e7f5105f0f964543980","src/ctx.rs":"738213a64a96cfe3beba6d08d82d89d48dc384b37fe726621b324bac5c017859","src/expr.rs":"e3c1237d1631f32ca2459f9579cbe4ec5877952227527df4feb5694f303f6d95","src/fn_decl.rs":"85c30d78942bb7cda0c6bddcf55f1a35b3581a99fb15e33f3abf2763b84f8073","src/generics.rs":"0ee307fadb0922599d9f8b0be5b9eb6966a601b2792167fe881911efc5debcb1","src/ident.rs":"31ebf657a9c267e24e66ed5e83cc76056e8d2564a8f60883871490e414154223","src/invoke.rs":"03f52dd0b135e8ffcc52c3802cdf8d516ef4a53e393ce4bdd82ced19fd106b88","src/item.rs":"238d4e8ecef7c1d2a4104e6ff12a24bdf0a238c22e4ea6749dad12bd21febf33","src/lib.rs":"64faae6667ed9702bd06fd942dc27e53b7dd484aabe15396ef3c212c0b255316","src/lifetime.rs":"1801727768d88328b816a6aafe92add956d2399a82e794ca2eeac47d5f5bd681","src/lit.rs":"5420333f97ab32d9f373336851c1791802ef73fa5f1bc5139288f503c28a1ba6","src/mac.rs":"ac9569bf0f87a043dcb31063a64cff405b7f6996efaa8d9059cbc4b18781e356","src/method.rs":"bce543c148022170decd0cff9af3b37781323bcdf0dc35e23beec5f200dbc549","src/pat.rs":"39cc530a1b246e67c1e004fee1dcba9befe4264404d9a38ced3cb348a88b4c55","src/path.rs":"d5370cf1b134e564a636ce435213b3027b6e24ae42eb94c9806ec13e2b9a6045","src/qpath.rs":"b01bfe2b391754d00f32b7691ae7d65d0d91d78d69c4dfa9250e34d27b5315cf","src/self_.rs":"565780ba85ba851675331cd60dbe8a43f5eb87c318f6cc3b11bb7ba77a0d53fa","src/stmt.rs":"99e577b1417ff66c3057454ca27266a19329c6896b0f36259dcbdba0ff0005fb","src/struct_field.rs":"189fa910e236fea815d85c6b4535a76e6e7151a9d113a806bb60c6a192c7042b","src/symbol.rs":"ecab71523e9a819e063ce4231520bb7b46ba2ac8f2e2212f4f4e189d2988792e","src/ty.rs":"d79a6d58e008d520761e3a6c1a5dc7732fa62694680a23a2c07dc9ea44781f2e","src/ty_param.rs":"082adf61d2959ffe6880e85b6c0356a59529a52c1caee23f0403d33bf7b600c0","src/variant.rs":"7fed49d694e029c81b4b70095e00704f1c67ef6357d122157d305f85dd95a512","src/variant_data.rs":"346198e982a2549ed4942ac7c6581f222f6284392afd9c0898acbfa53f58ffd3","src/where_predicate.rs":"41bc54f94e9fdc89b1a86cb293fb2626b3fd3905666a7baa7b78d41baa18abfa"},"package":"4ccfdf7355d9db158df68f976ed030ab0f6578af811f5a7bb6dcf221ec24e0e0"}
|
||||
{"files":{"Cargo.toml":"687fdaee594caaf4e71f43436f1ad56ede33916858eda1dbd1996ead64e1434e","src/arm.rs":"83b6ba22ded921ae45e02888e879b2ae73d4659db53e6552675433c3c2e0ed21","src/attr.rs":"7c6d6ff66cfbfa23e5857192db1c7e97c3b2826f4434ea7bd5d4b1ded1fe8b5e","src/block.rs":"71e2268ba151b7ee60a2fe0b0b3a7cf3e2ce3bff4fb0ee260db70ad9b1cd8826","src/constant.rs":"471b0ffc52684733a598a43e08b1719bf6852c26eca74e7f5105f0f964543980","src/ctx.rs":"738213a64a96cfe3beba6d08d82d89d48dc384b37fe726621b324bac5c017859","src/expr.rs":"e3c1237d1631f32ca2459f9579cbe4ec5877952227527df4feb5694f303f6d95","src/fn_decl.rs":"85c30d78942bb7cda0c6bddcf55f1a35b3581a99fb15e33f3abf2763b84f8073","src/generics.rs":"0ee307fadb0922599d9f8b0be5b9eb6966a601b2792167fe881911efc5debcb1","src/ident.rs":"31ebf657a9c267e24e66ed5e83cc76056e8d2564a8f60883871490e414154223","src/invoke.rs":"03f52dd0b135e8ffcc52c3802cdf8d516ef4a53e393ce4bdd82ced19fd106b88","src/item.rs":"238d4e8ecef7c1d2a4104e6ff12a24bdf0a238c22e4ea6749dad12bd21febf33","src/lib.rs":"64faae6667ed9702bd06fd942dc27e53b7dd484aabe15396ef3c212c0b255316","src/lifetime.rs":"1801727768d88328b816a6aafe92add956d2399a82e794ca2eeac47d5f5bd681","src/lit.rs":"5420333f97ab32d9f373336851c1791802ef73fa5f1bc5139288f503c28a1ba6","src/mac.rs":"ac9569bf0f87a043dcb31063a64cff405b7f6996efaa8d9059cbc4b18781e356","src/method.rs":"bce543c148022170decd0cff9af3b37781323bcdf0dc35e23beec5f200dbc549","src/pat.rs":"39cc530a1b246e67c1e004fee1dcba9befe4264404d9a38ced3cb348a88b4c55","src/path.rs":"d5370cf1b134e564a636ce435213b3027b6e24ae42eb94c9806ec13e2b9a6045","src/qpath.rs":"b01bfe2b391754d00f32b7691ae7d65d0d91d78d69c4dfa9250e34d27b5315cf","src/self_.rs":"565780ba85ba851675331cd60dbe8a43f5eb87c318f6cc3b11bb7ba77a0d53fa","src/stmt.rs":"99e577b1417ff66c3057454ca27266a19329c6896b0f36259dcbdba0ff0005fb","src/struct_field.rs":"189fa910e236fea815d85c6b4535a76e6e7151a9d113a806bb60c6a192c7042b","src/symbol.rs":"ecab71523e9a819e063ce4231520bb7b46ba2ac8f2e2212f4f4e189d2988792e","src/ty.rs":"d79a6d58e008d520761e3a6c1a5dc7732fa62694680a23a2c07dc9ea44781f2e","src/ty_param.rs":"082adf61d2959ffe6880e85b6c0356a59529a52c1caee23f0403d33bf7b600c0","src/variant.rs":"7fed49d694e029c81b4b70095e00704f1c67ef6357d122157d305f85dd95a512","src/variant_data.rs":"346198e982a2549ed4942ac7c6581f222f6284392afd9c0898acbfa53f58ffd3","src/where_predicate.rs":"41bc54f94e9fdc89b1a86cb293fb2626b3fd3905666a7baa7b78d41baa18abfa"},"package":"4ccfdf7355d9db158df68f976ed030ab0f6578af811f5a7bb6dcf221ec24e0e0"}
|
0
third_party/rust/aster/.cargo-ok
vendored
0
third_party/rust/aster/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"2246eb912d5b6592d7eafb7bcb171b602533d2f4522cf7f963c1cf10457dda40","README.md":"365e853efc3662c9750a93c8b67de69054bf585342abd2fc11a214ce0a408419","benches/basic.rs":"aba00ab044b37a7fb4e5c855cf88a323a04d6143b651717e227fdd12735602f3","src/lib.rs":"8fadbfe41328feeb9671c0408aaf6d18c2ca2b48b5740768e549e75ca2192ce6","tests/basic.rs":"1422080709fd5ccc45af363875926d140a3d85f3497f17e858576f1214a3b638"},"package":"fb2dcb6e6d35f20276943cc04bb98e538b348d525a04ac79c10021561d202f21"}
|
||||
{"files":{"Cargo.toml":"2246eb912d5b6592d7eafb7bcb171b602533d2f4522cf7f963c1cf10457dda40","README.md":"365e853efc3662c9750a93c8b67de69054bf585342abd2fc11a214ce0a408419","benches/basic.rs":"aba00ab044b37a7fb4e5c855cf88a323a04d6143b651717e227fdd12735602f3","src/lib.rs":"8fadbfe41328feeb9671c0408aaf6d18c2ca2b48b5740768e549e75ca2192ce6","tests/basic.rs":"1422080709fd5ccc45af363875926d140a3d85f3497f17e858576f1214a3b638"},"package":"fb2dcb6e6d35f20276943cc04bb98e538b348d525a04ac79c10021561d202f21"}
|
2
third_party/rust/atty/.cargo-checksum.json
vendored
2
third_party/rust/atty/.cargo-checksum.json
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"4752c993a36dc8b271f25998b2c0b34af65f82fb61f7d71d0e34612a8a7cd5b0","CHANGELOG.md":"a182831141a059342664a8aaf40b9fd7828e8004094fb42e1b17129a090899ec","Cargo.toml":"5fa1586ac82ee945f057b87c81acae6e588de2303536445b4a766028633347e0","LICENSE":"235760c32039b0a6b23207918b71c1aa5d8318ee651c0f245d290ba1f47631cf","README.md":"b23f66e15c8311e11cbc3b10bfc87a7cb10bc4d758c6a352b155127b48b970d7","appveyor.yml":"dfe3d3eddd762a3cc76174e03ea91c93f544ce7fa05fbca4975f1624757d65e4","examples/atty.rs":"1551387a71474d9ac1b5153231f884e9e05213badcfaa3494ad2cb7ea958374a","src/lib.rs":"4530fe39e123b042eb023e4cf98a81d5184d06c938d3604b002f418101beb524"},"package":"d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159"}
|
||||
{"files":{".travis.yml":"4752c993a36dc8b271f25998b2c0b34af65f82fb61f7d71d0e34612a8a7cd5b0","CHANGELOG.md":"a182831141a059342664a8aaf40b9fd7828e8004094fb42e1b17129a090899ec","Cargo.toml":"5fa1586ac82ee945f057b87c81acae6e588de2303536445b4a766028633347e0","LICENSE":"235760c32039b0a6b23207918b71c1aa5d8318ee651c0f245d290ba1f47631cf","README.md":"b23f66e15c8311e11cbc3b10bfc87a7cb10bc4d758c6a352b155127b48b970d7","appveyor.yml":"dfe3d3eddd762a3cc76174e03ea91c93f544ce7fa05fbca4975f1624757d65e4","examples/atty.rs":"1551387a71474d9ac1b5153231f884e9e05213badcfaa3494ad2cb7ea958374a","src/lib.rs":"4530fe39e123b042eb023e4cf98a81d5184d06c938d3604b002f418101beb524"},"package":"d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159"}
|
0
third_party/rust/atty/.cargo-ok
vendored
0
third_party/rust/atty/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"749f043da5cdbd988e2068e94feb3e75ed326945a99cf288c94ae444f5328680","build.rs":"2cf7c28f03f85c8e68969bcb5b076c8effa8543d39a12fe651ff332ac6a394c7","src/lib.rs":"cb45ba047240bceac6ea74da50c2f48ae81a965b578c833a766a3ea0db1075f3","src/libbacktrace/ChangeLog":"ad6f9058524b950aed734db83419e0624df55a48af8091c8bcad7a125aeeffdd","src/libbacktrace/ChangeLog.jit":"ee143b5c9dc571d9aca006be246a83b1f019c39a3fd7b0025eb37463e30200ce","src/libbacktrace/Makefile.am":"74d0036c9715cb7fa6c749cead794ba96283f47d243cf2b25bc6fac8f04667d5","src/libbacktrace/Makefile.in":"9ca92df95c8d62b8a0e106357a796ef4d2c5ec7fd02ab133fd0a65de1984e096","src/libbacktrace/README":"3d1a15714583197945df8db054da6f30613316ec311c5ec2d68b92fab12364a2","src/libbacktrace/aclocal.m4":"e3a6dfa4ce929624ac289b260987a7fa9b512cfbf3ff6f39c5d1e38cbad1a0ea","src/libbacktrace/alloc.c":"829ceab369210fc60758f339807fe0bf55832c77adb3a4450fae586a90a9673d","src/libbacktrace/ansidecl.h":"14acfcd6c044bc73de85b120cbc3e626771a01712911ee1f6137585fd710fb1e","src/libbacktrace/atomic.c":"3e1882a520e0e1115107e194fbd97daa8d3feef15a70047969f4976e7542c263","src/libbacktrace/backtrace-supported.h.in":"42277f3c383386b6cfa3d3d889336e92303fac0ae1a9fb8a6a56737245dfb8f3","src/libbacktrace/backtrace.c":"76bdabddc4eb8a46a7eec98ce610c86909c89c629eb850a0cde98f5a78c9b99d","src/libbacktrace/backtrace.h":"cd2db6474556b655e42c0a973b871c1b6cb4796809490bf59cc8d3d0e8c083f5","src/libbacktrace/btest.c":"fff55e4acf6ad02a6f719046fc4e3f8bf795166ed9956122a79e17c6be266738","src/libbacktrace/config.guess":"8131853dbc8c3be5171fa96353de7a884a79d3f1d6b3fbf48f99037f5f95fe27","src/libbacktrace/config.h.in":"9b0d30416c93906e5c0ce36c95a7426bfd41228114f381949e89d263305b5b65","src/libbacktrace/config.sub":"3b739084e4b409aacf8531f87b57efa602eccdd17b5cddbc4ae1313a2c866f34","src/libbacktrace/configure":"2b45c89d06809c6ed49d70bfdf51a93e44370fc81f689169a073f47b14b366e5","src/libbacktrace/configure.ac":"360b1a033e33d2c58d2f36aaa6644a2aac0dd8960417df6d64202cc099a1c3f3","src/libbacktrace/dwarf.c":"b969c3abb07a09aa4ac5094dba5777d2c23fee77ade4ec0934142d6b81049785","src/libbacktrace/dwarf2.def":"d947302d8b259f0abdd9dd2f50a0713f4e7395c05ce88ddfdb37a7145b045d82","src/libbacktrace/dwarf2.h":"b3b13fa412a1573e3ee8dcb1d603ec33de7140f00b3bbbaa5292724f0087ace3","src/libbacktrace/elf.c":"728d7e47bf077de4dad6eecc76c134b4b4898dc5866572587692848f29aaec5c","src/libbacktrace/fileline.c":"bae25b6662bfd01a43bccc645206e00aeea27f18a51f6303f00f4fa1d9f2e861","src/libbacktrace/filenames.h":"bce400200dbc7452ca2a7f27dd36516949c4c94a135a6a322f011f3ce7817377","src/libbacktrace/filetype.awk":"9dd5352f288c3737fccd24a2c7583f4d0dbca2b95b2735a90a26b644478018af","src/libbacktrace/hashtab.h":"4cb7f68db5c2e8ff1190ecf859e7feb58447ea20bd9818bb1f447b46e2813c58","src/libbacktrace/install-sh":"d7c113e5484fce8b48f9a34a7a91e385ec279247d415b0b7d749bd56ad8ee8a2","src/libbacktrace/internal.h":"ed657e14aa33b4b5217919435e69019c5a677a00a9c134bf0297f000f146b093","src/libbacktrace/ltmain.sh":"ee4019f80b993cdb1bd13bf39434ad4f1ef15ae57a97594c53fb7b1d76d776a4","src/libbacktrace/missing":"b1a337b731bbb58846d31ca2f5143c293a455fa41b481e236e89a9016d96b034","src/libbacktrace/mmap.c":"fec72286a2d8a0c53fd56ea61b3766b87031f6f803f6de6c3c656e39bc85cdc2","src/libbacktrace/mmapio.c":"32a672fd2b8b3395c8a16ef11d839437ca35570fbc235bb0e2e70ef8097a12fc","src/libbacktrace/nounwind.c":"7694636af38ef488c814ab9b71854d6a259c1f3f635bd4c3ed99a88ca2beb5f1","src/libbacktrace/pecoff.c":"00cf6976cfc1e018f5e5473d4fbef4ae86de825dd2749897c45dfcebcefc6abf","src/libbacktrace/posix.c":"73754fcfa0a5b0342e8fe32166e7228b61e022699a8a3c9a2ef8e46260736704","src/libbacktrace/print.c":"ec1e80e17e27130bf9412470e8dc9155a0dc9ca3a78125081f5073b438b54157","src/libbacktrace/read.c":"399458fb06389aa4bd5ce376c4620cf733b5555d1dabe7ef19f185da1e37e614","src/libbacktrace/simple.c":"686d976c2bdb1a074f9be05af026d4b4c7a4978c2602268747d492563f18e0dc","src/libbacktrace/sort.c":"1a1e44af4e4d02fc568b318aa1517792edd6972a27029ba78e938856ef8ba1a0","src/libbacktrace/state.c":"49d547f5622b0ea0c39bc873b09a7dce276fdc6469118f5ab2e72c55bd0457fb","src/libbacktrace/stest.c":"aa1b90fe2d6dc8ac65ac0168776c2d242efc6460ac596deb14ac1e72bf764871","src/libbacktrace/unknown.c":"914aa113cd17ed678d40927391b35f6027e87b3a02e36e9f1822ec1efe9c0e20","symbol-map":"b941b2516efbb9e46521eeb166c60b31d52b2a4aaaf35d7f9af24946bbe1328a"},"package":"d192fd129132fbc97497c1f2ec2c2c5174e376b95f535199ef4fe0a293d33842"}
|
||||
{"files":{"Cargo.toml":"749f043da5cdbd988e2068e94feb3e75ed326945a99cf288c94ae444f5328680","build.rs":"2cf7c28f03f85c8e68969bcb5b076c8effa8543d39a12fe651ff332ac6a394c7","src/lib.rs":"cb45ba047240bceac6ea74da50c2f48ae81a965b578c833a766a3ea0db1075f3","src/libbacktrace/ChangeLog":"ad6f9058524b950aed734db83419e0624df55a48af8091c8bcad7a125aeeffdd","src/libbacktrace/ChangeLog.jit":"ee143b5c9dc571d9aca006be246a83b1f019c39a3fd7b0025eb37463e30200ce","src/libbacktrace/Makefile.am":"74d0036c9715cb7fa6c749cead794ba96283f47d243cf2b25bc6fac8f04667d5","src/libbacktrace/Makefile.in":"9ca92df95c8d62b8a0e106357a796ef4d2c5ec7fd02ab133fd0a65de1984e096","src/libbacktrace/README":"3d1a15714583197945df8db054da6f30613316ec311c5ec2d68b92fab12364a2","src/libbacktrace/aclocal.m4":"e3a6dfa4ce929624ac289b260987a7fa9b512cfbf3ff6f39c5d1e38cbad1a0ea","src/libbacktrace/alloc.c":"829ceab369210fc60758f339807fe0bf55832c77adb3a4450fae586a90a9673d","src/libbacktrace/ansidecl.h":"14acfcd6c044bc73de85b120cbc3e626771a01712911ee1f6137585fd710fb1e","src/libbacktrace/atomic.c":"3e1882a520e0e1115107e194fbd97daa8d3feef15a70047969f4976e7542c263","src/libbacktrace/backtrace-supported.h.in":"42277f3c383386b6cfa3d3d889336e92303fac0ae1a9fb8a6a56737245dfb8f3","src/libbacktrace/backtrace.c":"76bdabddc4eb8a46a7eec98ce610c86909c89c629eb850a0cde98f5a78c9b99d","src/libbacktrace/backtrace.h":"cd2db6474556b655e42c0a973b871c1b6cb4796809490bf59cc8d3d0e8c083f5","src/libbacktrace/btest.c":"fff55e4acf6ad02a6f719046fc4e3f8bf795166ed9956122a79e17c6be266738","src/libbacktrace/config.guess":"8131853dbc8c3be5171fa96353de7a884a79d3f1d6b3fbf48f99037f5f95fe27","src/libbacktrace/config.h.in":"9b0d30416c93906e5c0ce36c95a7426bfd41228114f381949e89d263305b5b65","src/libbacktrace/config.sub":"3b739084e4b409aacf8531f87b57efa602eccdd17b5cddbc4ae1313a2c866f34","src/libbacktrace/configure":"2b45c89d06809c6ed49d70bfdf51a93e44370fc81f689169a073f47b14b366e5","src/libbacktrace/configure.ac":"360b1a033e33d2c58d2f36aaa6644a2aac0dd8960417df6d64202cc099a1c3f3","src/libbacktrace/dwarf.c":"b969c3abb07a09aa4ac5094dba5777d2c23fee77ade4ec0934142d6b81049785","src/libbacktrace/dwarf2.def":"d947302d8b259f0abdd9dd2f50a0713f4e7395c05ce88ddfdb37a7145b045d82","src/libbacktrace/dwarf2.h":"b3b13fa412a1573e3ee8dcb1d603ec33de7140f00b3bbbaa5292724f0087ace3","src/libbacktrace/elf.c":"728d7e47bf077de4dad6eecc76c134b4b4898dc5866572587692848f29aaec5c","src/libbacktrace/fileline.c":"bae25b6662bfd01a43bccc645206e00aeea27f18a51f6303f00f4fa1d9f2e861","src/libbacktrace/filenames.h":"bce400200dbc7452ca2a7f27dd36516949c4c94a135a6a322f011f3ce7817377","src/libbacktrace/filetype.awk":"9dd5352f288c3737fccd24a2c7583f4d0dbca2b95b2735a90a26b644478018af","src/libbacktrace/hashtab.h":"4cb7f68db5c2e8ff1190ecf859e7feb58447ea20bd9818bb1f447b46e2813c58","src/libbacktrace/install-sh":"d7c113e5484fce8b48f9a34a7a91e385ec279247d415b0b7d749bd56ad8ee8a2","src/libbacktrace/internal.h":"ed657e14aa33b4b5217919435e69019c5a677a00a9c134bf0297f000f146b093","src/libbacktrace/ltmain.sh":"ee4019f80b993cdb1bd13bf39434ad4f1ef15ae57a97594c53fb7b1d76d776a4","src/libbacktrace/missing":"b1a337b731bbb58846d31ca2f5143c293a455fa41b481e236e89a9016d96b034","src/libbacktrace/mmap.c":"fec72286a2d8a0c53fd56ea61b3766b87031f6f803f6de6c3c656e39bc85cdc2","src/libbacktrace/mmapio.c":"32a672fd2b8b3395c8a16ef11d839437ca35570fbc235bb0e2e70ef8097a12fc","src/libbacktrace/nounwind.c":"7694636af38ef488c814ab9b71854d6a259c1f3f635bd4c3ed99a88ca2beb5f1","src/libbacktrace/pecoff.c":"00cf6976cfc1e018f5e5473d4fbef4ae86de825dd2749897c45dfcebcefc6abf","src/libbacktrace/posix.c":"73754fcfa0a5b0342e8fe32166e7228b61e022699a8a3c9a2ef8e46260736704","src/libbacktrace/print.c":"ec1e80e17e27130bf9412470e8dc9155a0dc9ca3a78125081f5073b438b54157","src/libbacktrace/read.c":"399458fb06389aa4bd5ce376c4620cf733b5555d1dabe7ef19f185da1e37e614","src/libbacktrace/simple.c":"686d976c2bdb1a074f9be05af026d4b4c7a4978c2602268747d492563f18e0dc","src/libbacktrace/sort.c":"1a1e44af4e4d02fc568b318aa1517792edd6972a27029ba78e938856ef8ba1a0","src/libbacktrace/state.c":"49d547f5622b0ea0c39bc873b09a7dce276fdc6469118f5ab2e72c55bd0457fb","src/libbacktrace/stest.c":"aa1b90fe2d6dc8ac65ac0168776c2d242efc6460ac596deb14ac1e72bf764871","src/libbacktrace/unknown.c":"914aa113cd17ed678d40927391b35f6027e87b3a02e36e9f1822ec1efe9c0e20","symbol-map":"b941b2516efbb9e46521eeb166c60b31d52b2a4aaaf35d7f9af24946bbe1328a"},"package":"d192fd129132fbc97497c1f2ec2c2c5174e376b95f535199ef4fe0a293d33842"}
|
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"6f11d19317924088c90d605e1d13e4af230b10e289c5df6139c40a62409eabd9","Cargo.toml":"f893b7b701611e48ab80db25670342084b11d8d4ed3f3471b68842c490d247b8","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"11061a4c1e27fde148b5b1fb6df553f8eb464e279be0f5e278d262bf35d7b0f8","appveyor.yml":"29d9f44137560479a75b02a7953cfa0c378c2577ed1925f579b400295c7937e3","examples/backtrace.rs":"fd6e1cc6c3378ec7d41cd03b2bef187051298dceb01147e71f207dbb8a0c4867","examples/raw.rs":"f07be26d1f97cd7ac79290ac99d19c4eec5d27031fe270ab5364c25d9c2ad9e0","src/backtrace/dbghelp.rs":"45c5052763857d4a3727c3082be1b2f6c28f7973afd66706657defda5d97c6ec","src/backtrace/libunwind.rs":"cc9cdc1d389571cdedf43dfc2d39b8c3af85531a3965ed700c724f436afb213e","src/backtrace/mod.rs":"d00f4a574fae44df81b1d40bf44acea84addb70b4c76c85bfaa1f3ab0bcd7f0d","src/backtrace/noop.rs":"dc4a6602e9852b945c382194402314d3d68c8ca90199af9a8159419fb91a3c99","src/backtrace/unix_backtrace.rs":"1bb4a4a2f1e56f8ac04002dd77411116d8b4920f905d1ddfcb289e242f939a86","src/capture.rs":"de3250fcb9ff941391dea24decc8166d058f17abe77d25ff82b766ac384f00ea","src/dylib.rs":"09f3d7f32849cf0daa4de9df48f8e4a4d5ba62e20723c79578201bd271dc4777","src/lib.rs":"7ccd8cc3679435f0e39efd26f23d9d7a01094ab09ba6d411c6587b2420c6886b","src/symbolize/coresymbolication.rs":"99280684791694f560824b39291ee7ad78a2b53f82e5972ff3d9b77b43671f60","src/symbolize/dbghelp.rs":"d743545bb3e64eafc4903e3e7aec115b64da2174e75afd7b465bc0b89573b88a","src/symbolize/dladdr.rs":"8287cbca440a9e92e74d88c5a7b920f6b4cf6d8f50bc8b0f61aca5ba42d5b5ec","src/symbolize/libbacktrace.rs":"0cdad7de2501baef9da193ee6aab21c453d26348a2071c805a133efe1209eaa1","src/symbolize/mod.rs":"7f2efe54ce40f42ba38673614cff2a510632123cb6d1bc3da88566f12bcba588","src/symbolize/noop.rs":"b622fcecb4e22b42c3d3e2ef5dc5a6ab14601fec83c7797ee1fbbacc12fe6ca1","tests/smoke.rs":"fc882d7db0f4842e4415e3319774a33ba27c4d6412a62f8ee194a5dafd8a6128"},"package":"72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76"}
|
||||
{"files":{".travis.yml":"6f11d19317924088c90d605e1d13e4af230b10e289c5df6139c40a62409eabd9","Cargo.toml":"f893b7b701611e48ab80db25670342084b11d8d4ed3f3471b68842c490d247b8","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"11061a4c1e27fde148b5b1fb6df553f8eb464e279be0f5e278d262bf35d7b0f8","appveyor.yml":"29d9f44137560479a75b02a7953cfa0c378c2577ed1925f579b400295c7937e3","examples/backtrace.rs":"fd6e1cc6c3378ec7d41cd03b2bef187051298dceb01147e71f207dbb8a0c4867","examples/raw.rs":"f07be26d1f97cd7ac79290ac99d19c4eec5d27031fe270ab5364c25d9c2ad9e0","src/backtrace/dbghelp.rs":"45c5052763857d4a3727c3082be1b2f6c28f7973afd66706657defda5d97c6ec","src/backtrace/libunwind.rs":"cc9cdc1d389571cdedf43dfc2d39b8c3af85531a3965ed700c724f436afb213e","src/backtrace/mod.rs":"d00f4a574fae44df81b1d40bf44acea84addb70b4c76c85bfaa1f3ab0bcd7f0d","src/backtrace/noop.rs":"dc4a6602e9852b945c382194402314d3d68c8ca90199af9a8159419fb91a3c99","src/backtrace/unix_backtrace.rs":"1bb4a4a2f1e56f8ac04002dd77411116d8b4920f905d1ddfcb289e242f939a86","src/capture.rs":"de3250fcb9ff941391dea24decc8166d058f17abe77d25ff82b766ac384f00ea","src/dylib.rs":"09f3d7f32849cf0daa4de9df48f8e4a4d5ba62e20723c79578201bd271dc4777","src/lib.rs":"7ccd8cc3679435f0e39efd26f23d9d7a01094ab09ba6d411c6587b2420c6886b","src/symbolize/coresymbolication.rs":"99280684791694f560824b39291ee7ad78a2b53f82e5972ff3d9b77b43671f60","src/symbolize/dbghelp.rs":"d743545bb3e64eafc4903e3e7aec115b64da2174e75afd7b465bc0b89573b88a","src/symbolize/dladdr.rs":"8287cbca440a9e92e74d88c5a7b920f6b4cf6d8f50bc8b0f61aca5ba42d5b5ec","src/symbolize/libbacktrace.rs":"0cdad7de2501baef9da193ee6aab21c453d26348a2071c805a133efe1209eaa1","src/symbolize/mod.rs":"7f2efe54ce40f42ba38673614cff2a510632123cb6d1bc3da88566f12bcba588","src/symbolize/noop.rs":"b622fcecb4e22b42c3d3e2ef5dc5a6ab14601fec83c7797ee1fbbacc12fe6ca1","tests/smoke.rs":"fc882d7db0f4842e4415e3319774a33ba27c4d6412a62f8ee194a5dafd8a6128"},"package":"72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76"}
|
0
third_party/rust/backtrace/.cargo-ok
vendored
0
third_party/rust/backtrace/.cargo-ok
vendored
2
third_party/rust/base64/.cargo-checksum.json
vendored
2
third_party/rust/base64/.cargo-checksum.json
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"79fbb792e6c1d05c44188c808ef7120c592e50291a706fe0f669b8ac9a2ad5e5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0dd882e53de11566d50f8e8e2d5a651bcf3fabee4987d70f306233cf39094ba7","README.md":"b2da2fd61c4f3abf45127d183b61eb2dabc1c97cd191854987aa0328549a663f","benches/benchmarks.rs":"f0469f65f901c3e92fa506c0deb277fd136a7f968cae7cc4f030c0c15e52322f","examples/make_tables.rs":"3c80f2a8cdb204168cc1b60f8904d544b2da067b9e6a7b40ade5fb4a994b4175","src/lib.rs":"a3ac363513ae99a9b0049c19c92bc46b57ac9a0ebfd3317b7b387c5fbaa16a8a","src/tables.rs":"378743892907cde87c1a92e6afee2df36ce590311e61381b2cc0404b3e018039","tests/tests.rs":"dc2c293bae576cc596bdfb6ef783dc1d24d3bf992bf532caaebe1738cb0608cc"},"package":"30e93c03064e7590d0466209155251b90c22e37fab1daf2771582598b5827557"}
|
||||
{"files":{"Cargo.toml":"79fbb792e6c1d05c44188c808ef7120c592e50291a706fe0f669b8ac9a2ad5e5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0dd882e53de11566d50f8e8e2d5a651bcf3fabee4987d70f306233cf39094ba7","README.md":"b2da2fd61c4f3abf45127d183b61eb2dabc1c97cd191854987aa0328549a663f","benches/benchmarks.rs":"f0469f65f901c3e92fa506c0deb277fd136a7f968cae7cc4f030c0c15e52322f","examples/make_tables.rs":"3c80f2a8cdb204168cc1b60f8904d544b2da067b9e6a7b40ade5fb4a994b4175","src/lib.rs":"a3ac363513ae99a9b0049c19c92bc46b57ac9a0ebfd3317b7b387c5fbaa16a8a","src/tables.rs":"378743892907cde87c1a92e6afee2df36ce590311e61381b2cc0404b3e018039","tests/tests.rs":"dc2c293bae576cc596bdfb6ef783dc1d24d3bf992bf532caaebe1738cb0608cc"},"package":"30e93c03064e7590d0466209155251b90c22e37fab1daf2771582598b5827557"}
|
0
third_party/rust/base64/.cargo-ok
vendored
0
third_party/rust/base64/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"0310eaafa77ed58afbc5f93b1a26e938e96533b352865bc75ff4a5993aa4a8e0","Cargo.toml":"aeff622e55caf0aaaa01d75ad13ea07be748fbecd2985a81aa6c7c0de5d07241","LICENSE":"b946744aeda89b467929585fe8eeb5461847695220c1b168fb375d8abd4ea3d0","README.md":"ed45cabc231f18f0972348f0e230d45c92495c31e4a06eb105e8259ed9b582b3","src/lib.rs":"f97ad15f6ae8664f4978aaa057c0a8e27a050dc1ea79f8b66506d8fd8c7a22f9"},"package":"88ceb0d16c4fd0e42876e298d7d3ce3780dd9ebdcbe4199816a32c77e08597ff"}
|
||||
{"files":{".travis.yml":"0310eaafa77ed58afbc5f93b1a26e938e96533b352865bc75ff4a5993aa4a8e0","Cargo.toml":"aeff622e55caf0aaaa01d75ad13ea07be748fbecd2985a81aa6c7c0de5d07241","LICENSE":"b946744aeda89b467929585fe8eeb5461847695220c1b168fb375d8abd4ea3d0","README.md":"ed45cabc231f18f0972348f0e230d45c92495c31e4a06eb105e8259ed9b582b3","src/lib.rs":"f97ad15f6ae8664f4978aaa057c0a8e27a050dc1ea79f8b66506d8fd8c7a22f9"},"package":"88ceb0d16c4fd0e42876e298d7d3ce3780dd9ebdcbe4199816a32c77e08597ff"}
|
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"f705a11b487bf71c41ebd8223cc1f3cbde0dfdfeea96a100af55e06e93397a1b","Cargo.toml":"b3ef32df664d22cfe4526f0022c8789e8976970b9e0982e1dd52f4f811134515","LICENSE.md":"90d7e062634054e6866d3c81e6a2b3058a840e6af733e98e80bdfe1a7dec6912","changelist.org":"936b58455e1c221539b73b5250302dcd96baa04a5d8536199d3351142addad57","examples/basic.rs":"ef6ab76936c8322b9f89fe8308311339c0bf7b413c5f88b5314b0035d49917a3","logo.png":"ebc5305aae938c1f834cf35302faa8be0f1b7b8c3c3beef5cf6b2f68b9628c35","readme.dev.md":"43bad3bcc13a5c057344d3ba7f64bd2b313f8c133d6afa068108df73e8e8facd","readme.md":"ca48b4a712089d792d449ef6e0e399efaf227dbcfcb141540684a16a2763583b","src/de/mod.rs":"8651e00130bd062e2305dcce8b68d777fff9877688e776b239778e18046dddaf","src/de/read.rs":"5abca51c6f0d93cc144914ed30bf2cfd0074ced09a0de8c3983997aaa471562d","src/internal.rs":"d9448e8467caf4cf24703626dab9e0d9420e98419e323ad7e611e4aeab525e4a","src/lib.rs":"998b85e103f8f5480ffeef43bd8430a66c061011055a053377f37dce32bf9088","src/ser/mod.rs":"0eeb467eeb8189fb935e4996cd45d1f292c401f92b00793907bd428f1bde421d","tests/test.rs":"26598b882a691caa5301a569e56e31567bfba5ffeab6f0ca67ebd95bfae679b0"},"package":"e103c8b299b28a9c6990458b7013dc4a8356a9b854c51b9883241f5866fac36e"}
|
||||
{"files":{".travis.yml":"f705a11b487bf71c41ebd8223cc1f3cbde0dfdfeea96a100af55e06e93397a1b","Cargo.toml":"b3ef32df664d22cfe4526f0022c8789e8976970b9e0982e1dd52f4f811134515","LICENSE.md":"90d7e062634054e6866d3c81e6a2b3058a840e6af733e98e80bdfe1a7dec6912","changelist.org":"936b58455e1c221539b73b5250302dcd96baa04a5d8536199d3351142addad57","examples/basic.rs":"ef6ab76936c8322b9f89fe8308311339c0bf7b413c5f88b5314b0035d49917a3","logo.png":"ebc5305aae938c1f834cf35302faa8be0f1b7b8c3c3beef5cf6b2f68b9628c35","readme.dev.md":"43bad3bcc13a5c057344d3ba7f64bd2b313f8c133d6afa068108df73e8e8facd","readme.md":"ca48b4a712089d792d449ef6e0e399efaf227dbcfcb141540684a16a2763583b","src/de/mod.rs":"8651e00130bd062e2305dcce8b68d777fff9877688e776b239778e18046dddaf","src/de/read.rs":"5abca51c6f0d93cc144914ed30bf2cfd0074ced09a0de8c3983997aaa471562d","src/internal.rs":"d9448e8467caf4cf24703626dab9e0d9420e98419e323ad7e611e4aeab525e4a","src/lib.rs":"998b85e103f8f5480ffeef43bd8430a66c061011055a053377f37dce32bf9088","src/ser/mod.rs":"0eeb467eeb8189fb935e4996cd45d1f292c401f92b00793907bd428f1bde421d","tests/test.rs":"26598b882a691caa5301a569e56e31567bfba5ffeab6f0ca67ebd95bfae679b0"},"package":"e103c8b299b28a9c6990458b7013dc4a8356a9b854c51b9883241f5866fac36e"}
|
0
third_party/rust/bincode/.cargo-ok
vendored
0
third_party/rust/bincode/.cargo-ok
vendored
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"8f81f53eb8f6cfc4d8c0e5eaed51b0a7d85a60c9b710fd9df62d25a1db189f92","build.rs":"deff14b2204700f9fd40ba426148d648626461a4ce372c49b8c0f92e09646c80","src/callbacks.rs":"c5c4e5bc8c49cb191d1b100339772fdc7dd1dbf5025a9de1ecaafb70f86cb48f","src/clang.rs":"541a016580c98c2e2af36c3c11b80127c26090795a380480c925c5f411f8100d","src/codegen/derive_debug.rs":"77e16be27a6999726978bf33dc54227cf3b074101ebd55e90f655340cf05ba8b","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"19c5b4a86df9410d7e6cb27c2a8797dd205e4c96eab203798b70cd30dd35e572","src/codegen/mod.rs":"4488f141de2abb5d1fa36df7818daeeebba4f5237a9e43101fc9d805e0a80436","src/codegen/struct_layout.rs":"b92fef035e5deaf3fe9f3c2d4ea61a758b873f6f193fe68693955d9d14a396cb","src/extra_assertions.rs":"449549c4a7a50c3f0b06332452b2fb6c9b23f31ca8e5e1656fe6c7f21e8ef7fa","src/features.rs":"b686a3e4ce5712473d0a7c0f817bef29b9337265ec6df1278087a708e1180108","src/ir/analysis/derive_copy.rs":"e17960cd79d764a36fd7cea8bad944a8994fc9cb3a20080955f28509b9e66c9e","src/ir/analysis/derive_debug.rs":"ffb933c46cc26c0ed7c7ccf16a0a19dddb3b0108ca913bd41b785c3afbd4ee0b","src/ir/analysis/derive_default.rs":"740b281eddf9f9f0606963fef7485e9219e7ebedeb7966c83c63f723d1deb62f","src/ir/analysis/derive_hash.rs":"6c046a54d495e3d6ec666f23c6209212321f72f1ed843523e8a9aa0cd6421c9e","src/ir/analysis/derive_partial_eq.rs":"fdd0d78861f146ce9f62c49979009cfad82ec9b96c8c79415513158fc9bf7ad0","src/ir/analysis/has_destructor.rs":"42fdc74e363bc32dbe51558cb5b330bad0e40d79b4cd3c6ff36b6f418a68c0ad","src/ir/analysis/has_float.rs":"02b7ccf9a99b1d96e3a0ec712de45461ab714184129f2634de46b33fb1758ccd","src/ir/analysis/has_type_param_in_array.rs":"39f10af6a6b7af17ee505777dbd10989942272b44efba2a1e320d8b4bbabe0f0","src/ir/analysis/has_vtable.rs":"33def5eb43270fff87455a0e8d262817876e2cf8c676b8cb6c8ec37e84dd99d1","src/ir/analysis/mod.rs":"10a7817a9c990dd8125e4ca9ed1fe02b9a0e27c4dd0320e909bb55f727ed8191","src/ir/analysis/template_params.rs":"e1a3709c3c07b7be21e3912339820f86992b56af44d923919023b7e015f41755","src/ir/annotations.rs":"ef106afcbe6084c18bd13a37ee3c1cdc9596bfb055db8c773d81f8f15fec3208","src/ir/comment.rs":"36f2a1d3970fdbf3d72c1f094043902747cde395215bdf7e9103926d9df011fd","src/ir/comp.rs":"062ea5ec95717e32b26be39bd4664179ff790831042205d795af1a4654922c8d","src/ir/context.rs":"68dbaa11ae5041965e08de24955852982f10c764decb7ba1de6c82073e95916c","src/ir/derive.rs":"608e9bacd6d6d29f5b4357fe2f7cdda62e79c77271b022e5275d22abc22788d3","src/ir/dot.rs":"173e57c3017182279bff98ea5edfd8e6e007a25e70da27139578a637a0a747bc","src/ir/enum_ty.rs":"d633d4d36a64cafd4e1e4ba82872058d5a0aada007e47353e4905ce1fe7d16ec","src/ir/function.rs":"409b779469c8092100991bc442b0b5bcfe9d5510edb71db12a38181df7519938","src/ir/int.rs":"1f61a472288afe489d9320bc8b13920333ece57891ae8570b4c4f25ab50688e6","src/ir/item.rs":"bff6369353b37a209236d750d274c0282a8669c9f7bee2b0eeea706e17537d1f","src/ir/item_kind.rs":"13048962657436a757ff9483d96f2ce351ec5f827ecab4921ed643f6f115c497","src/ir/layout.rs":"39c415271629fc5a43373bcd5ba8bfa26ebb2544aa9e28598b0141214111bb67","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"5d46d631cec17ef1d1882da60080898760181c2ddf991473afdd464bf8c7d867","src/ir/objc.rs":"52454e14371535ff4da4025cf45fee3d3beadbe36759a6ebf0d1d7048a00714f","src/ir/template.rs":"cc96a205dec677962376cec0bdbf53820d633378fa92d9faeb34953d2943a928","src/ir/traversal.rs":"521fdd685ba8c684199cbc8131561ed39aed852dd0d1e76e17d8d2a3d204428b","src/ir/ty.rs":"263e7c5794b56dd0499db8b102169f70881b5ff1d15ded1fe49fc24c29d9ab34","src/ir/var.rs":"c60354e164e357480e72b20d7f5c2f7188da8af38ad1db0a3f79806ef60388ab","src/lib.rs":"6efe2ba78af7a2c790e73e03ca6876c24a56636b3b2fb74926a866675dc7ee71","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"6ebd647814b339bbd318f5d55f54ef98091138c2c7208436a88204be56a5a49b","src/options.rs":"cced11c8ba947953098df62beb7980dd72d9aa9c6fd3c8dba5aac745bdcd2315","src/parse.rs":"812171946f0ec8a83f26f9041151ad9dcdff11961e5154e4dae4be248f86b296","src/regex_set.rs":"e4cc668c724a80f7dd7d028f4a22146680513b40cf3a5255551c41079d302309"},"package":"33024f55a754d920637461adf87fb485702a69bdf7ac1d307b7e18da93bae505"}
|
||||
{"files":{"Cargo.toml":"8f81f53eb8f6cfc4d8c0e5eaed51b0a7d85a60c9b710fd9df62d25a1db189f92","build.rs":"deff14b2204700f9fd40ba426148d648626461a4ce372c49b8c0f92e09646c80","src/callbacks.rs":"c5c4e5bc8c49cb191d1b100339772fdc7dd1dbf5025a9de1ecaafb70f86cb48f","src/clang.rs":"541a016580c98c2e2af36c3c11b80127c26090795a380480c925c5f411f8100d","src/codegen/derive_debug.rs":"77e16be27a6999726978bf33dc54227cf3b074101ebd55e90f655340cf05ba8b","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"19c5b4a86df9410d7e6cb27c2a8797dd205e4c96eab203798b70cd30dd35e572","src/codegen/mod.rs":"4488f141de2abb5d1fa36df7818daeeebba4f5237a9e43101fc9d805e0a80436","src/codegen/struct_layout.rs":"b92fef035e5deaf3fe9f3c2d4ea61a758b873f6f193fe68693955d9d14a396cb","src/extra_assertions.rs":"449549c4a7a50c3f0b06332452b2fb6c9b23f31ca8e5e1656fe6c7f21e8ef7fa","src/features.rs":"b686a3e4ce5712473d0a7c0f817bef29b9337265ec6df1278087a708e1180108","src/ir/analysis/derive_copy.rs":"e17960cd79d764a36fd7cea8bad944a8994fc9cb3a20080955f28509b9e66c9e","src/ir/analysis/derive_debug.rs":"ffb933c46cc26c0ed7c7ccf16a0a19dddb3b0108ca913bd41b785c3afbd4ee0b","src/ir/analysis/derive_default.rs":"740b281eddf9f9f0606963fef7485e9219e7ebedeb7966c83c63f723d1deb62f","src/ir/analysis/derive_hash.rs":"6c046a54d495e3d6ec666f23c6209212321f72f1ed843523e8a9aa0cd6421c9e","src/ir/analysis/derive_partial_eq.rs":"fdd0d78861f146ce9f62c49979009cfad82ec9b96c8c79415513158fc9bf7ad0","src/ir/analysis/has_destructor.rs":"42fdc74e363bc32dbe51558cb5b330bad0e40d79b4cd3c6ff36b6f418a68c0ad","src/ir/analysis/has_float.rs":"02b7ccf9a99b1d96e3a0ec712de45461ab714184129f2634de46b33fb1758ccd","src/ir/analysis/has_type_param_in_array.rs":"39f10af6a6b7af17ee505777dbd10989942272b44efba2a1e320d8b4bbabe0f0","src/ir/analysis/has_vtable.rs":"33def5eb43270fff87455a0e8d262817876e2cf8c676b8cb6c8ec37e84dd99d1","src/ir/analysis/mod.rs":"10a7817a9c990dd8125e4ca9ed1fe02b9a0e27c4dd0320e909bb55f727ed8191","src/ir/analysis/template_params.rs":"e1a3709c3c07b7be21e3912339820f86992b56af44d923919023b7e015f41755","src/ir/annotations.rs":"ef106afcbe6084c18bd13a37ee3c1cdc9596bfb055db8c773d81f8f15fec3208","src/ir/comment.rs":"36f2a1d3970fdbf3d72c1f094043902747cde395215bdf7e9103926d9df011fd","src/ir/comp.rs":"062ea5ec95717e32b26be39bd4664179ff790831042205d795af1a4654922c8d","src/ir/context.rs":"68dbaa11ae5041965e08de24955852982f10c764decb7ba1de6c82073e95916c","src/ir/derive.rs":"608e9bacd6d6d29f5b4357fe2f7cdda62e79c77271b022e5275d22abc22788d3","src/ir/dot.rs":"173e57c3017182279bff98ea5edfd8e6e007a25e70da27139578a637a0a747bc","src/ir/enum_ty.rs":"d633d4d36a64cafd4e1e4ba82872058d5a0aada007e47353e4905ce1fe7d16ec","src/ir/function.rs":"409b779469c8092100991bc442b0b5bcfe9d5510edb71db12a38181df7519938","src/ir/int.rs":"1f61a472288afe489d9320bc8b13920333ece57891ae8570b4c4f25ab50688e6","src/ir/item.rs":"bff6369353b37a209236d750d274c0282a8669c9f7bee2b0eeea706e17537d1f","src/ir/item_kind.rs":"13048962657436a757ff9483d96f2ce351ec5f827ecab4921ed643f6f115c497","src/ir/layout.rs":"39c415271629fc5a43373bcd5ba8bfa26ebb2544aa9e28598b0141214111bb67","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"5d46d631cec17ef1d1882da60080898760181c2ddf991473afdd464bf8c7d867","src/ir/objc.rs":"52454e14371535ff4da4025cf45fee3d3beadbe36759a6ebf0d1d7048a00714f","src/ir/template.rs":"cc96a205dec677962376cec0bdbf53820d633378fa92d9faeb34953d2943a928","src/ir/traversal.rs":"521fdd685ba8c684199cbc8131561ed39aed852dd0d1e76e17d8d2a3d204428b","src/ir/ty.rs":"263e7c5794b56dd0499db8b102169f70881b5ff1d15ded1fe49fc24c29d9ab34","src/ir/var.rs":"c60354e164e357480e72b20d7f5c2f7188da8af38ad1db0a3f79806ef60388ab","src/lib.rs":"6efe2ba78af7a2c790e73e03ca6876c24a56636b3b2fb74926a866675dc7ee71","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"6ebd647814b339bbd318f5d55f54ef98091138c2c7208436a88204be56a5a49b","src/options.rs":"cced11c8ba947953098df62beb7980dd72d9aa9c6fd3c8dba5aac745bdcd2315","src/parse.rs":"812171946f0ec8a83f26f9041151ad9dcdff11961e5154e4dae4be248f86b296","src/regex_set.rs":"e4cc668c724a80f7dd7d028f4a22146680513b40cf3a5255551c41079d302309"},"package":"33024f55a754d920637461adf87fb485702a69bdf7ac1d307b7e18da93bae505"}
|
0
third_party/rust/bindgen/.cargo-ok
vendored
0
third_party/rust/bindgen/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"2b615144d3f4b2e63ba6ec435cc18df7d76354aa07c2a02d6c707028cc448784","Cargo.toml":"db8c2e9ea912c5f3d2d89cf4cf936c448300e356b0fb533db8875923cb135256","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"8cfbc986af45867d9e620188af2392320fe6e0d9536753ba415c94ab522f5fb5","src/lib.rs":"618ce383bb219725363fba174fc66beb4874d9682e5da953f9e3e9cb3f786d5f","tests/external.rs":"546e549ec831876a5dc272bd0537adc9e9886c6da54656c825e7bffc079e2c74","tests/external_no_std.rs":"48929f5109aabc156442d5ae2ab07b4bce5d648488bf49dba725f6ab23bcb48a"},"package":"aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"}
|
||||
{"files":{".travis.yml":"2b615144d3f4b2e63ba6ec435cc18df7d76354aa07c2a02d6c707028cc448784","Cargo.toml":"db8c2e9ea912c5f3d2d89cf4cf936c448300e356b0fb533db8875923cb135256","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"8cfbc986af45867d9e620188af2392320fe6e0d9536753ba415c94ab522f5fb5","src/lib.rs":"618ce383bb219725363fba174fc66beb4874d9682e5da953f9e3e9cb3f786d5f","tests/external.rs":"546e549ec831876a5dc272bd0537adc9e9886c6da54656c825e7bffc079e2c74","tests/external_no_std.rs":"48929f5109aabc156442d5ae2ab07b4bce5d648488bf49dba725f6ab23bcb48a"},"package":"aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"}
|
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"793de473e858941a0d41e0c4e114373bca6b822737cdcf5ff8f36238a9b51837","Cargo.toml":"98d1298b1d79ccc587957062cf1c56712f68ee2796bed5f39c8d334133d9c562","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"1cce1c9c1fe2cf40ec1c6a0384f8cc2f0c5c40ece4acfedd64330ed95ef74e44","src/lib.rs":"006a631d800f713e2ffc74e33f65fd47505eec1b047c109e180905a9dcb7e973","tests/external.rs":"546e549ec831876a5dc272bd0537adc9e9886c6da54656c825e7bffc079e2c74","tests/external_no_std.rs":"48929f5109aabc156442d5ae2ab07b4bce5d648488bf49dba725f6ab23bcb48a","tests/i128_bitflags.rs":"fb1bf9e01f528478539c52de94e82a96b2639dc271ea242fea6ebb32dcb0f99e"},"package":"1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"}
|
||||
{"files":{".travis.yml":"793de473e858941a0d41e0c4e114373bca6b822737cdcf5ff8f36238a9b51837","Cargo.toml":"98d1298b1d79ccc587957062cf1c56712f68ee2796bed5f39c8d334133d9c562","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"1cce1c9c1fe2cf40ec1c6a0384f8cc2f0c5c40ece4acfedd64330ed95ef74e44","src/lib.rs":"006a631d800f713e2ffc74e33f65fd47505eec1b047c109e180905a9dcb7e973","tests/external.rs":"546e549ec831876a5dc272bd0537adc9e9886c6da54656c825e7bffc079e2c74","tests/external_no_std.rs":"48929f5109aabc156442d5ae2ab07b4bce5d648488bf49dba725f6ab23bcb48a","tests/i128_bitflags.rs":"fb1bf9e01f528478539c52de94e82a96b2639dc271ea242fea6ebb32dcb0f99e"},"package":"1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"}
|
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"e7a77c1800f9852e4c9a2acb9df041773ecd0bc005bd1b0657ae0512c67100ac","Cargo.toml":"f35826eec96c765ae8aee4f8a66c6b3cb0d918b49935baf05bae79b6df8e1077","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"602c63819e332e93c85dc8426db4855f18fe0fabbd642c5b2303ed83f1ba926f","src/example_generated.rs":"161b69d92cf6e5fa4b5dc30f06031f3a0fb590b44be2bcf0f31cb8be4fab36fa","src/lib.rs":"56e86a16356d9322fa6b4e9b910041e2e7558c08b52ffbdacc647eba36b37abc","tests/conflicting_trait_impls.rs":"79993ea67ef09a5f99fddd69d8b73b1c137e41d0e8f8535f03865d6766dcc498","tests/external.rs":"15f7901698e286197666ccd309ad1debd3c35eaff680ca090368494e8b06ccf2","tests/external_no_std.rs":"c3556fd19dd91d1b093eb6a65d09a9d0985544f0377ba3d30c0e265c956f7237","tests/i128_bitflags.rs":"c955ef2c9fd385848195bb416e660e946ccbe59acc87862ef2646eb082d82e3f"},"package":"4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"}
|
||||
{"files":{".travis.yml":"e7a77c1800f9852e4c9a2acb9df041773ecd0bc005bd1b0657ae0512c67100ac","Cargo.toml":"f35826eec96c765ae8aee4f8a66c6b3cb0d918b49935baf05bae79b6df8e1077","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"602c63819e332e93c85dc8426db4855f18fe0fabbd642c5b2303ed83f1ba926f","src/example_generated.rs":"161b69d92cf6e5fa4b5dc30f06031f3a0fb590b44be2bcf0f31cb8be4fab36fa","src/lib.rs":"56e86a16356d9322fa6b4e9b910041e2e7558c08b52ffbdacc647eba36b37abc","tests/conflicting_trait_impls.rs":"79993ea67ef09a5f99fddd69d8b73b1c137e41d0e8f8535f03865d6766dcc498","tests/external.rs":"15f7901698e286197666ccd309ad1debd3c35eaff680ca090368494e8b06ccf2","tests/external_no_std.rs":"c3556fd19dd91d1b093eb6a65d09a9d0985544f0377ba3d30c0e265c956f7237","tests/i128_bitflags.rs":"c955ef2c9fd385848195bb416e660e946ccbe59acc87862ef2646eb082d82e3f"},"package":"4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"}
|
0
third_party/rust/bitflags/.cargo-ok
vendored
0
third_party/rust/bitflags/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"f79c29325421aef57d8191a6a19450b62a431a78a6a5be39f5e8ec259316cdac","Cargo.toml":"4ea2fe4a12740a572f459cc5c51ca721b1a7b256a0976be561c9b0a9fce0dcc7","LICENSE-APACHE":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","LICENSE-MIT":"8583712ee2b062ff3d4d6d3e16f19ff0f92bc3a0a4beeec11a81ef00146fbd4f","README.md":"a8bfdd9509bb3bb30b30bbe308a717e9827cf97d7a97e5fb5cd69bdd3c88a490","src/lib.rs":"a7ed9d2607f47b7d5d11ccaccf23486a21d072435231d09f4548ad0c4ad62f5b","src/tests.rs":"c4e99780432b3ad05f625961699da72239a975f838cb0ab1cf2501424baed38c"},"package":"80b13e2ab064ff3aa0bdbf1eff533f9822dc37899821f5f98c67f263eab51707"}
|
||||
{"files":{".travis.yml":"f79c29325421aef57d8191a6a19450b62a431a78a6a5be39f5e8ec259316cdac","Cargo.toml":"4ea2fe4a12740a572f459cc5c51ca721b1a7b256a0976be561c9b0a9fce0dcc7","LICENSE-APACHE":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","LICENSE-MIT":"8583712ee2b062ff3d4d6d3e16f19ff0f92bc3a0a4beeec11a81ef00146fbd4f","README.md":"a8bfdd9509bb3bb30b30bbe308a717e9827cf97d7a97e5fb5cd69bdd3c88a490","src/lib.rs":"a7ed9d2607f47b7d5d11ccaccf23486a21d072435231d09f4548ad0c4ad62f5b","src/tests.rs":"c4e99780432b3ad05f625961699da72239a975f838cb0ab1cf2501424baed38c"},"package":"80b13e2ab064ff3aa0bdbf1eff533f9822dc37899821f5f98c67f263eab51707"}
|
0
third_party/rust/bitreader/.cargo-ok
vendored
0
third_party/rust/bitreader/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"8be744358afc27dd3d9b89bf462482665f8165f626c0f37d4978b72b0e8b5fa7",".travis/id_rsa.enc":"da014c69739eb05c578d7f837241cdfcbe2d07a3d8b3b5f74ad1b6249198a9ab",".travis/travis-doc-upload.cfg":"37782ba0bcc600e42118d8da6198c6a0b310e56d86c94b836ae013e4878d872a",".travis/travis-doc-upload.sh":"086bbbd0a48f0f77c7c95f6bbaee07ffbf48268164e915147850d004e629a71f","Cargo.toml":"81d0f28c9ce143e63d06ef48252959aecd2bc47992ff61e63cb2e96421b48178","LICENSE":"861865431d6a6977a3d4da92f26788f26b441b8f0e4293615e30e94f54082b21","README.md":"f2b937c27c1845003ac311dd600cf61e7f9c9396e48fabc76253019e53fc7b8d","src/lib.rs":"a7064ce098775df840099ea99b3c50233b6b5662599a9b62af80edec4350279c","src/macros.rs":"7a2c9844e1d48e016ee1a34a8623c7a7475be0bcbb7d33acf50a32bfbeab20a4","src/no_send.rs":"f78a6135793fde462580d068213ac909361848443f6942bbece733490528acd8","src/send.rs":"c29819c7c2105b8188f4c374bdacf12eb2d4863288522f60efb9d5ba442f6cb8","src/traits.rs":"6952e490726775fbcf8036d5f0c7a6d0ef56401b8a26b9badac93ea68401e15c"},"package":"8380105befe91099e6f69206164072c05bc92427ff6aa8a5171388317346dd75"}
|
||||
{"files":{".travis.yml":"8be744358afc27dd3d9b89bf462482665f8165f626c0f37d4978b72b0e8b5fa7",".travis/id_rsa.enc":"da014c69739eb05c578d7f837241cdfcbe2d07a3d8b3b5f74ad1b6249198a9ab",".travis/travis-doc-upload.cfg":"37782ba0bcc600e42118d8da6198c6a0b310e56d86c94b836ae013e4878d872a",".travis/travis-doc-upload.sh":"086bbbd0a48f0f77c7c95f6bbaee07ffbf48268164e915147850d004e629a71f","Cargo.toml":"81d0f28c9ce143e63d06ef48252959aecd2bc47992ff61e63cb2e96421b48178","LICENSE":"861865431d6a6977a3d4da92f26788f26b441b8f0e4293615e30e94f54082b21","README.md":"f2b937c27c1845003ac311dd600cf61e7f9c9396e48fabc76253019e53fc7b8d","src/lib.rs":"a7064ce098775df840099ea99b3c50233b6b5662599a9b62af80edec4350279c","src/macros.rs":"7a2c9844e1d48e016ee1a34a8623c7a7475be0bcbb7d33acf50a32bfbeab20a4","src/no_send.rs":"f78a6135793fde462580d068213ac909361848443f6942bbece733490528acd8","src/send.rs":"c29819c7c2105b8188f4c374bdacf12eb2d4863288522f60efb9d5ba442f6cb8","src/traits.rs":"6952e490726775fbcf8036d5f0c7a6d0ef56401b8a26b9badac93ea68401e15c"},"package":"8380105befe91099e6f69206164072c05bc92427ff6aa8a5171388317346dd75"}
|
0
third_party/rust/boxfnonce/.cargo-ok
vendored
0
third_party/rust/boxfnonce/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"c8243fb884ca390f5a7b8cc45e1c0d5bbbdd7e4e82ada2dc1880b3a904c9ce12","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"b6cd79e1f2a93cd8a5c6e6dd7985c46fc26e442ae5b8ed4a0ff37a4ad4708023","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","README.md":"0559514b9d7488e96fb7a2f3c043a62fadf3495a1e10602d109ce79ee67da998","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","benches/bench.rs":"f583692d829c8dfe19b1d5b9e968ccf5c74d6733367ca183edff74041a6afedd","src/lib.rs":"b038b8a84b2b7b2143b2835185b3cbbacaf056fa8a2f03bec84bfd79c913c726","src/new.rs":"161c21b7ebb5668c7cc70b46b0eb37709e06bb9c854f2fdfc6ce3d3babcbf3de"},"package":"c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8"}
|
||||
{"files":{".travis.yml":"c8243fb884ca390f5a7b8cc45e1c0d5bbbdd7e4e82ada2dc1880b3a904c9ce12","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"b6cd79e1f2a93cd8a5c6e6dd7985c46fc26e442ae5b8ed4a0ff37a4ad4708023","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","README.md":"0559514b9d7488e96fb7a2f3c043a62fadf3495a1e10602d109ce79ee67da998","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","benches/bench.rs":"f583692d829c8dfe19b1d5b9e968ccf5c74d6733367ca183edff74041a6afedd","src/lib.rs":"b038b8a84b2b7b2143b2835185b3cbbacaf056fa8a2f03bec84bfd79c913c726","src/new.rs":"161c21b7ebb5668c7cc70b46b0eb37709e06bb9c854f2fdfc6ce3d3babcbf3de"},"package":"c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8"}
|
0
third_party/rust/byteorder/.cargo-ok
vendored
0
third_party/rust/byteorder/.cargo-ok
vendored
1
third_party/rust/bytes/.cargo-checksum.json
vendored
Normal file
1
third_party/rust/bytes/.cargo-checksum.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"files":{"CHANGELOG.md":"c6b490cbd81117cd0500e8dc26ca74cdf04eb49639ac0287eef559d7791cde1f","Cargo.toml":"3f1fe6c7e1e0bb164730bb584a58e128587dd742cfd1ab6bcda4c482be694bf5","LICENSE-APACHE":"01b5abb4a95cc87b220efbd67a1e99c74bef3d744806dd44b4d57e81db814962","LICENSE-MIT":"d4784f55731ba75b77ad73a52808914b26b2f93b69dd4c03249528a75afbd946","README.md":"7f5f585db959c73bcb1e8afd52b1c4110e57c2264a387f713b388f98181faebf","benches/bytes.rs":"bc1ef63dae52f111c78009399b16308e9e3c454b3ab5c46f89626e246fce3bd4","ci/before_deploy.ps1":"a8ee0204dd1397a245a47626fecd98eff5da76e12b15139c06271b3cc309a3e1","ci/before_deploy.sh":"ea008e2c544482cba5b659c17887ccd5354779c629096f28e667d40391299cc5","ci/install.sh":"8b165fc99df296261fcc9cdcbc8b8a177c11c505cdc9255cc19efb66cb0055db","ci/script.sh":"4e6f6b7df02d316ce5166a3526dc6bca6b6d051dbc5bd6d5b28a7c79fc646834","src/buf/buf.rs":"a8a26bb22fd5becd2062e756fc272eb6e09606e9e40120c4999634cb068b1837","src/buf/buf_mut.rs":"35e7fee4727f1628bc899216a74f9652235be255a035687d56bf8df71ebd29a4","src/buf/chain.rs":"3a4f88879d27240e84e58bbeddf3f7c0958d0d81f4707245199b53e922029a26","src/buf/from_buf.rs":"949683c6a08099b280bd324d0c8646b1d6ff80af4d3e9397edb76cc2f1b18c88","src/buf/into_buf.rs":"d982cb82f3f2ddba863366c36f9f6041b2076e7bb8906e882e47ef65742974db","src/buf/iter.rs":"325428e4f913beb602f6451b59847d4c8658ec23939a15f7b145733969c17f03","src/buf/mod.rs":"4f385ce47d6d19a064a1dbec3339e95e116aa9b501eb9d8a47030c2794e1ee9e","src/buf/reader.rs":"62098e87bd1aa8b7f57ed4a4d1b5417462f01ad2cfebfbac46b6ce7f00ea0192","src/buf/take.rs":"0bdd0720afc546c999e5a3125f20b6f31a5692b37f7218c25f414773e2702f3d","src/buf/writer.rs":"4a28c1d362e837682a4b3197732a6dbb4072dc660f0dbba18616679adf8a60f2","src/bytes.rs":"7b1ba792e6062ac9453b46bf1f8af7ea7784ccb142d38b40491b1a3c6d2f2e5a","src/debug.rs":"f01f07b199994400a62aa872344a19737198c8bce0fdc5a4b5b34d9cd37dee75","src/lib.rs":"cf5e336f8e04a35204e092eb9a6bf0fd8dc1cf8c639b5bb45f1298e7178deef4","src/serde.rs":"e8d0fe3630e173272756fb24a8c3ccb112f4cb551b8b88b64f669a71f39ef83b","tests/test_buf.rs":"5a29764cdc3f7c1eda563562dea1b624b923c088330eb4b894c28eb4e0faaf87","tests/test_buf_mut.rs":"5aefacb92183c747c9e91a469d675d6490618742ee5982d74af220faa9343ef1","tests/test_bytes.rs":"5fbd44ae30dc07883b5c5a5e6d8c91037525dc0cf6cfdcfb78033c3867089665","tests/test_chain.rs":"7bda7550927cf7799c708fedaaf4cd2924ed3fd800f30ef126d6c9efe48c3986","tests/test_debug.rs":"232f8a604668a61dc580eb064cf0fbc21f664182928438710c7cfde14bd637f4","tests/test_from_buf.rs":"9bf743c77e69c643d0a7673426547dacaedbcc65028a26cf5864eb6714e4897a","tests/test_iter.rs":"bc8a5da0b3cc7e5a5dc37e91dd2a3ca3fc78ba74b087883473043be45cd9b265","tests/test_serde.rs":"98e0ab121153a7ead47538257ac7fc7d5db081fc35050552b5e5dc9500b414f9","tests/test_take.rs":"bb81822eec5d3774bd2626f0f29b543d3651f4f5a95c51dfe8f93dec8b4f8e94"},"package":"d828f97b58cc5de3e40c421d0cf2132d6b2da4ee0e11b8632fa838f0f9333ad6"}
|
45
third_party/rust/bytes/CHANGELOG.md
vendored
Normal file
45
third_party/rust/bytes/CHANGELOG.md
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
# 0.4.5 (August 12, 2017)
|
||||
|
||||
* Fix range bug in `Take::bytes`
|
||||
* Misc performance improvements
|
||||
* Add extra `PartialEq` implementations.
|
||||
* Add `Bytes::with_capacity`
|
||||
* Implement `AsMut[u8]` for `BytesMut`
|
||||
|
||||
# 0.4.4 (May 26, 2017)
|
||||
|
||||
* Add serde support behind feature flag
|
||||
* Add `extend_from_slice` on `Bytes` and `BytesMut`
|
||||
* Add `truncate` and `clear` on `Bytes`
|
||||
* Misc additional std trait implementations
|
||||
* Misc performance improvements
|
||||
|
||||
# 0.4.3 (April 30, 2017)
|
||||
|
||||
* Fix Vec::advance_mut bug
|
||||
* Bump minimum Rust version to 1.15
|
||||
* Misc performance tweaks
|
||||
|
||||
# 0.4.2 (April 5, 2017)
|
||||
|
||||
* Misc performance tweaks
|
||||
* Improved `Debug` implementation for `Bytes`
|
||||
* Avoid some incorrect assert panics
|
||||
|
||||
# 0.4.1 (March 15, 2017)
|
||||
|
||||
* Expose `buf` module and have most types available from there vs. root.
|
||||
* Implement `IntoBuf` for `T: Buf`.
|
||||
* Add `FromBuf` and `Buf::collect`.
|
||||
* Add iterator adapter for `Buf`.
|
||||
* Add scatter/gather support to `Buf` and `BufMut`.
|
||||
* Add `Buf::chain`.
|
||||
* Reduce allocations on repeated calls to `BytesMut::reserve`.
|
||||
* Implement `Debug` for more types.
|
||||
* Remove `Source` in favor of `IntoBuf`.
|
||||
* Implement `Extend` for `BytesMut`.
|
||||
|
||||
|
||||
# 0.4.0 (February 24, 2017)
|
||||
|
||||
* Initial release
|
36
third_party/rust/bytes/Cargo.toml
vendored
Normal file
36
third_party/rust/bytes/Cargo.toml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
||||
#
|
||||
# When uploading crates to the registry Cargo will automatically
|
||||
# "normalize" Cargo.toml files for maximal compatibility
|
||||
# with all versions of Cargo and also rewrite `path` dependencies
|
||||
# to registry (e.g. crates.io) dependencies
|
||||
#
|
||||
# If you believe there's an error in this file please file an
|
||||
# issue against the rust-lang/cargo repository. If you're
|
||||
# editing this file be aware that the upstream Cargo.toml
|
||||
# will likely look very different (and much more reasonable)
|
||||
|
||||
[package]
|
||||
name = "bytes"
|
||||
version = "0.4.5"
|
||||
authors = ["Carl Lerche <me@carllerche.com>"]
|
||||
exclude = [".gitignore", ".travis.yml", "deploy.sh", "bench/**/*", "test/**/*"]
|
||||
description = "Types and traits for working with bytes"
|
||||
homepage = "https://github.com/carllerche/bytes"
|
||||
documentation = "https://carllerche.github.io/bytes/bytes"
|
||||
readme = "README.md"
|
||||
keywords = ["buffers", "zero-copy", "io"]
|
||||
categories = ["network-programming", "data-structures"]
|
||||
license = "MIT/Apache-2.0"
|
||||
repository = "https://github.com/carllerche/bytes"
|
||||
[dependencies.byteorder]
|
||||
version = "1.0.0"
|
||||
|
||||
[dependencies.serde]
|
||||
version = "1.0"
|
||||
optional = true
|
||||
|
||||
[dependencies.iovec]
|
||||
version = "0.1"
|
||||
[dev-dependencies.serde_test]
|
||||
version = "1.0"
|
201
third_party/rust/bytes/LICENSE-APACHE
vendored
Normal file
201
third_party/rust/bytes/LICENSE-APACHE
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2017 Carl Lerche
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
25
third_party/rust/bytes/LICENSE-MIT
vendored
Normal file
25
third_party/rust/bytes/LICENSE-MIT
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
Copyright (c) 2017 Carl Lerche
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
42
third_party/rust/bytes/README.md
vendored
Normal file
42
third_party/rust/bytes/README.md
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
# Bytes
|
||||
|
||||
A utility library for working with bytes.
|
||||
|
||||
[![Crates.io](https://img.shields.io/crates/v/bytes.svg?maxAge=2592000)](https://crates.io/crates/bytes)
|
||||
[![Build Status](https://travis-ci.org/carllerche/bytes.svg?branch=master)](https://travis-ci.org/carllerche/bytes)
|
||||
|
||||
[Documentation](https://carllerche.github.io/bytes/bytes/index.html)
|
||||
|
||||
## Usage
|
||||
|
||||
To use `bytes`, first add this to your `Cargo.toml`:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
bytes = "0.4"
|
||||
```
|
||||
|
||||
Next, add this to your crate:
|
||||
|
||||
```rust
|
||||
extern crate bytes;
|
||||
|
||||
use bytes::{Bytes, BytesMut, Buf, BufMut};
|
||||
```
|
||||
|
||||
## Serde support
|
||||
|
||||
Serde support is optional and disabled by default. To enable use the feature `serde`.
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
bytes = { version = "0.4", features = ["serde"] }
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
`bytes` is primarily distributed under the terms of both the MIT license and the
|
||||
Apache License (Version 2.0), with portions covered by various BSD-like
|
||||
licenses.
|
||||
|
||||
See LICENSE-APACHE, and LICENSE-MIT for details.
|
205
third_party/rust/bytes/benches/bytes.rs
vendored
Normal file
205
third_party/rust/bytes/benches/bytes.rs
vendored
Normal file
@ -0,0 +1,205 @@
|
||||
#![feature(test)]
|
||||
|
||||
extern crate bytes;
|
||||
extern crate test;
|
||||
|
||||
use test::Bencher;
|
||||
use bytes::{Bytes, BytesMut, BufMut};
|
||||
|
||||
#[bench]
|
||||
fn alloc_small(b: &mut Bencher) {
|
||||
b.iter(|| {
|
||||
for _ in 0..1024 {
|
||||
test::black_box(BytesMut::with_capacity(12));
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alloc_mid(b: &mut Bencher) {
|
||||
b.iter(|| {
|
||||
test::black_box(BytesMut::with_capacity(128));
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alloc_big(b: &mut Bencher) {
|
||||
b.iter(|| {
|
||||
test::black_box(BytesMut::with_capacity(4096));
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deref_unique(b: &mut Bencher) {
|
||||
let mut buf = BytesMut::with_capacity(4096);
|
||||
buf.put(&[0u8; 1024][..]);
|
||||
|
||||
b.iter(|| {
|
||||
for _ in 0..1024 {
|
||||
test::black_box(&buf[..]);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deref_unique_unroll(b: &mut Bencher) {
|
||||
let mut buf = BytesMut::with_capacity(4096);
|
||||
buf.put(&[0u8; 1024][..]);
|
||||
|
||||
b.iter(|| {
|
||||
for _ in 0..128 {
|
||||
test::black_box(&buf[..]);
|
||||
test::black_box(&buf[..]);
|
||||
test::black_box(&buf[..]);
|
||||
test::black_box(&buf[..]);
|
||||
test::black_box(&buf[..]);
|
||||
test::black_box(&buf[..]);
|
||||
test::black_box(&buf[..]);
|
||||
test::black_box(&buf[..]);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deref_shared(b: &mut Bencher) {
|
||||
let mut buf = BytesMut::with_capacity(4096);
|
||||
buf.put(&[0u8; 1024][..]);
|
||||
let _b2 = buf.split_off(1024);
|
||||
|
||||
b.iter(|| {
|
||||
for _ in 0..1024 {
|
||||
test::black_box(&buf[..]);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deref_inline(b: &mut Bencher) {
|
||||
let mut buf = BytesMut::with_capacity(8);
|
||||
buf.put(&[0u8; 8][..]);
|
||||
|
||||
b.iter(|| {
|
||||
for _ in 0..1024 {
|
||||
test::black_box(&buf[..]);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn deref_two(b: &mut Bencher) {
|
||||
let mut buf1 = BytesMut::with_capacity(8);
|
||||
buf1.put(&[0u8; 8][..]);
|
||||
|
||||
let mut buf2 = BytesMut::with_capacity(4096);
|
||||
buf2.put(&[0u8; 1024][..]);
|
||||
|
||||
b.iter(|| {
|
||||
for _ in 0..512 {
|
||||
test::black_box(&buf1[..]);
|
||||
test::black_box(&buf2[..]);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn alloc_write_split_to_mid(b: &mut Bencher) {
|
||||
b.iter(|| {
|
||||
let mut buf = BytesMut::with_capacity(128);
|
||||
buf.put_slice(&[0u8; 64]);
|
||||
test::black_box(buf.split_to(64));
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn drain_write_drain(b: &mut Bencher) {
|
||||
let data = [0u8; 128];
|
||||
|
||||
b.iter(|| {
|
||||
let mut buf = BytesMut::with_capacity(1024);
|
||||
let mut parts = Vec::with_capacity(8);
|
||||
|
||||
for _ in 0..8 {
|
||||
buf.put(&data[..]);
|
||||
parts.push(buf.split_to(128));
|
||||
}
|
||||
|
||||
test::black_box(parts);
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn fmt_write(b: &mut Bencher) {
|
||||
use std::fmt::Write;
|
||||
let mut buf = BytesMut::with_capacity(128);
|
||||
let s = "foo bar baz quux lorem ipsum dolor et";
|
||||
|
||||
b.bytes = s.len() as u64;
|
||||
b.iter(|| {
|
||||
let _ = write!(buf, "{}", s);
|
||||
test::black_box(&buf);
|
||||
unsafe { buf.set_len(0); }
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn from_long_slice(b: &mut Bencher) {
|
||||
let data = [0u8; 128];
|
||||
b.bytes = data.len() as u64;
|
||||
b.iter(|| {
|
||||
let buf = BytesMut::from(&data[..]);
|
||||
test::black_box(buf);
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn slice_empty(b: &mut Bencher) {
|
||||
b.iter(|| {
|
||||
let b = Bytes::from(vec![17; 1024]).clone();
|
||||
for i in 0..1000 {
|
||||
test::black_box(b.slice(i % 100, i % 100));
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn slice_short_from_arc(b: &mut Bencher) {
|
||||
b.iter(|| {
|
||||
// `clone` is to convert to ARC
|
||||
let b = Bytes::from(vec![17; 1024]).clone();
|
||||
for i in 0..1000 {
|
||||
test::black_box(b.slice(1, 2 + i % 10));
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Keep in sync with bytes.rs
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
const INLINE_CAP: usize = 4 * 8 - 1;
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
const INLINE_CAP: usize = 4 * 4 - 1;
|
||||
|
||||
#[bench]
|
||||
fn slice_avg_le_inline_from_arc(b: &mut Bencher) {
|
||||
b.iter(|| {
|
||||
// `clone` is to convert to ARC
|
||||
let b = Bytes::from(vec![17; 1024]).clone();
|
||||
for i in 0..1000 {
|
||||
// [1, INLINE_CAP]
|
||||
let len = 1 + i % (INLINE_CAP - 1);
|
||||
test::black_box(b.slice(i % 10, i % 10 + len));
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn slice_large_le_inline_from_arc(b: &mut Bencher) {
|
||||
b.iter(|| {
|
||||
// `clone` is to convert to ARC
|
||||
let b = Bytes::from(vec![17; 1024]).clone();
|
||||
for i in 0..1000 {
|
||||
// [INLINE_CAP - 10, INLINE_CAP]
|
||||
let len = INLINE_CAP - 9 + i % 10;
|
||||
test::black_box(b.slice(i % 10, i % 10 + len));
|
||||
}
|
||||
})
|
||||
}
|
23
third_party/rust/bytes/ci/before_deploy.ps1
vendored
Normal file
23
third_party/rust/bytes/ci/before_deploy.ps1
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# This script takes care of packaging the build artifacts that will go in the
|
||||
# release zipfile
|
||||
|
||||
$SRC_DIR = $PWD.Path
|
||||
$STAGE = [System.Guid]::NewGuid().ToString()
|
||||
|
||||
Set-Location $ENV:Temp
|
||||
New-Item -Type Directory -Name $STAGE
|
||||
Set-Location $STAGE
|
||||
|
||||
$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip"
|
||||
|
||||
# TODO Update this to package the right artifacts
|
||||
Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\hello.exe" '.\'
|
||||
|
||||
7z a "$ZIP" *
|
||||
|
||||
Push-AppveyorArtifact "$ZIP"
|
||||
|
||||
Remove-Item *.* -Force
|
||||
Set-Location ..
|
||||
Remove-Item $STAGE
|
||||
Set-Location $SRC_DIR
|
33
third_party/rust/bytes/ci/before_deploy.sh
vendored
Normal file
33
third_party/rust/bytes/ci/before_deploy.sh
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
# This script takes care of building your crate and packaging it for release
|
||||
|
||||
set -ex
|
||||
|
||||
main() {
|
||||
local src=$(pwd) \
|
||||
stage=
|
||||
|
||||
case $TRAVIS_OS_NAME in
|
||||
linux)
|
||||
stage=$(mktemp -d)
|
||||
;;
|
||||
osx)
|
||||
stage=$(mktemp -d -t tmp)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -f Cargo.lock || cargo generate-lockfile
|
||||
|
||||
# TODO Update this to build the artifacts that matter to you
|
||||
cross rustc --bin hello --target $TARGET --release -- -C lto
|
||||
|
||||
# TODO Update this to package the right artifacts
|
||||
cp target/$TARGET/release/hello $stage/
|
||||
|
||||
cd $stage
|
||||
tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *
|
||||
cd $src
|
||||
|
||||
rm -rf $stage
|
||||
}
|
||||
|
||||
main
|
31
third_party/rust/bytes/ci/install.sh
vendored
Normal file
31
third_party/rust/bytes/ci/install.sh
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
set -ex
|
||||
|
||||
main() {
|
||||
curl https://sh.rustup.rs -sSf | \
|
||||
sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION
|
||||
|
||||
local target=
|
||||
if [ $TRAVIS_OS_NAME = linux ]; then
|
||||
target=x86_64-unknown-linux-gnu
|
||||
sort=sort
|
||||
else
|
||||
target=x86_64-apple-darwin
|
||||
sort=gsort # for `sort --sort-version`, from brew's coreutils.
|
||||
fi
|
||||
|
||||
# This fetches latest stable release
|
||||
local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
|
||||
| cut -d/ -f3 \
|
||||
| grep -E '^v[0-9.]+$' \
|
||||
| $sort --version-sort \
|
||||
| tail -n1)
|
||||
echo cross version: $tag
|
||||
curl -LSfs https://japaric.github.io/trust/install.sh | \
|
||||
sh -s -- \
|
||||
--force \
|
||||
--git japaric/cross \
|
||||
--tag $tag \
|
||||
--target $target
|
||||
}
|
||||
|
||||
main
|
18
third_party/rust/bytes/ci/script.sh
vendored
Normal file
18
third_party/rust/bytes/ci/script.sh
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
# This script takes care of testing your crate
|
||||
|
||||
set -ex
|
||||
|
||||
main() {
|
||||
cross build --target $TARGET $EXTRA_ARGS
|
||||
|
||||
if [ ! -z $DISABLE_TESTS ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
cross test --target $TARGET $EXTRA_ARGS
|
||||
}
|
||||
|
||||
# we don't run the "test phase" when doing deploys
|
||||
if [ -z $TRAVIS_TAG ]; then
|
||||
main
|
||||
fi
|
751
third_party/rust/bytes/src/buf/buf.rs
vendored
Normal file
751
third_party/rust/bytes/src/buf/buf.rs
vendored
Normal file
@ -0,0 +1,751 @@
|
||||
use super::{IntoBuf, Take, Reader, Iter, FromBuf, Chain};
|
||||
use byteorder::ByteOrder;
|
||||
use iovec::IoVec;
|
||||
|
||||
use std::{cmp, io, ptr};
|
||||
|
||||
/// Read bytes from a buffer.
|
||||
///
|
||||
/// A buffer stores bytes in memory such that read operations are infallible.
|
||||
/// The underlying storage may or may not be in contiguous memory. A `Buf` value
|
||||
/// is a cursor into the buffer. Reading from `Buf` advances the cursor
|
||||
/// position. It can be thought of as an efficient `Iterator` for collections of
|
||||
/// bytes.
|
||||
///
|
||||
/// The simplest `Buf` is a `Cursor` wrapping a `[u8]`.
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::Buf;
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world");
|
||||
///
|
||||
/// assert_eq!(b'h', buf.get_u8());
|
||||
/// assert_eq!(b'e', buf.get_u8());
|
||||
/// assert_eq!(b'l', buf.get_u8());
|
||||
///
|
||||
/// let mut rest = [0; 8];
|
||||
/// buf.copy_to_slice(&mut rest);
|
||||
///
|
||||
/// assert_eq!(&rest[..], b"lo world");
|
||||
/// ```
|
||||
pub trait Buf {
|
||||
/// Returns the number of bytes between the current position and the end of
|
||||
/// the buffer.
|
||||
///
|
||||
/// This value is greater than or equal to the length of the slice returned
|
||||
/// by `bytes`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::Buf;
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world");
|
||||
///
|
||||
/// assert_eq!(buf.remaining(), 11);
|
||||
///
|
||||
/// buf.get_u8();
|
||||
///
|
||||
/// assert_eq!(buf.remaining(), 10);
|
||||
/// ```
|
||||
///
|
||||
/// # Implementer notes
|
||||
///
|
||||
/// Implementations of `remaining` should ensure that the return value does
|
||||
/// not change unless a call is made to `advance` or any other function that
|
||||
/// is documented to change the `Buf`'s current position.
|
||||
fn remaining(&self) -> usize;
|
||||
|
||||
/// Returns a slice starting at the current position and of length between 0
|
||||
/// and `Buf::remaining()`.
|
||||
///
|
||||
/// This is a lower level function. Most operations are done with other
|
||||
/// functions.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::Buf;
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world");
|
||||
///
|
||||
/// assert_eq!(buf.bytes(), b"hello world");
|
||||
///
|
||||
/// buf.advance(6);
|
||||
///
|
||||
/// assert_eq!(buf.bytes(), b"world");
|
||||
/// ```
|
||||
///
|
||||
/// # Implementer notes
|
||||
///
|
||||
/// This function should never panic. Once the end of the buffer is reached,
|
||||
/// i.e., `Buf::remaining` returns 0, calls to `bytes` should return an
|
||||
/// empty slice.
|
||||
fn bytes(&self) -> &[u8];
|
||||
|
||||
/// Fills `dst` with potentially multiple slices starting at `self`'s
|
||||
/// current position.
|
||||
///
|
||||
/// If the `Buf` is backed by disjoint slices of bytes, `bytes_vec` enables
|
||||
/// fetching more than one slice at once. `dst` is a slice of `IoVec`
|
||||
/// references, enabling the slice to be directly used with [`writev`]
|
||||
/// without any further conversion. The sum of the lengths of all the
|
||||
/// buffers in `dst` will be less than or equal to `Buf::remaining()`.
|
||||
///
|
||||
/// The entries in `dst` will be overwritten, but the data **contained** by
|
||||
/// the slices **will not** be modified. If `bytes_vec` does not fill every
|
||||
/// entry in `dst`, then `dst` is guaranteed to contain all remaining slices
|
||||
/// in `self.
|
||||
///
|
||||
/// This is a lower level function. Most operations are done with other
|
||||
/// functions.
|
||||
///
|
||||
/// # Implementer notes
|
||||
///
|
||||
/// This function should never panic. Once the end of the buffer is reached,
|
||||
/// i.e., `Buf::remaining` returns 0, calls to `bytes_vec` must return 0
|
||||
/// without mutating `dst`.
|
||||
///
|
||||
/// Implementations should also take care to properly handle being called
|
||||
/// with `dst` being a zero length slice.
|
||||
///
|
||||
/// [`writev`]: http://man7.org/linux/man-pages/man2/readv.2.html
|
||||
fn bytes_vec<'a>(&'a self, dst: &mut [&'a IoVec]) -> usize {
|
||||
if dst.is_empty() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if self.has_remaining() {
|
||||
dst[0] = self.bytes().into();
|
||||
1
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
/// Advance the internal cursor of the Buf
|
||||
///
|
||||
/// The next call to `bytes` will return a slice starting `cnt` bytes
|
||||
/// further into the underlying buffer.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::Buf;
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world");
|
||||
///
|
||||
/// assert_eq!(buf.bytes(), b"hello world");
|
||||
///
|
||||
/// buf.advance(6);
|
||||
///
|
||||
/// assert_eq!(buf.bytes(), b"world");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function **may** panic if `cnt > self.remaining()`.
|
||||
///
|
||||
/// # Implementer notes
|
||||
///
|
||||
/// It is recommended for implementations of `advance` to panic if `cnt >
|
||||
/// self.remaining()`. If the implementation does not panic, the call must
|
||||
/// behave as if `cnt == self.remaining()`.
|
||||
///
|
||||
/// A call with `cnt == 0` should never panic and be a no-op.
|
||||
fn advance(&mut self, cnt: usize);
|
||||
|
||||
/// Returns true if there are any more bytes to consume
|
||||
///
|
||||
/// This is equivalent to `self.remaining() != 0`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::Buf;
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"a");
|
||||
///
|
||||
/// assert!(buf.has_remaining());
|
||||
///
|
||||
/// buf.get_u8();
|
||||
///
|
||||
/// assert!(!buf.has_remaining());
|
||||
/// ```
|
||||
fn has_remaining(&self) -> bool {
|
||||
self.remaining() > 0
|
||||
}
|
||||
|
||||
/// Copies bytes from `self` into `dst`.
|
||||
///
|
||||
/// The cursor is advanced by the number of bytes copied. `self` must have
|
||||
/// enough remaining bytes to fill `dst`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::Buf;
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world");
|
||||
/// let mut dst = [0; 5];
|
||||
///
|
||||
/// buf.copy_to_slice(&mut dst);
|
||||
/// assert_eq!(b"hello", &dst);
|
||||
/// assert_eq!(6, buf.remaining());
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if `self.remaining() < dst.len()`
|
||||
fn copy_to_slice(&mut self, dst: &mut [u8]) {
|
||||
let mut off = 0;
|
||||
|
||||
assert!(self.remaining() >= dst.len());
|
||||
|
||||
while off < dst.len() {
|
||||
let cnt;
|
||||
|
||||
unsafe {
|
||||
let src = self.bytes();
|
||||
cnt = cmp::min(src.len(), dst.len() - off);
|
||||
|
||||
ptr::copy_nonoverlapping(
|
||||
src.as_ptr(), dst[off..].as_mut_ptr(), cnt);
|
||||
|
||||
off += src.len();
|
||||
}
|
||||
|
||||
self.advance(cnt);
|
||||
}
|
||||
}
|
||||
|
||||
/// Gets an unsigned 8 bit integer from `self`.
|
||||
///
|
||||
/// The current position is advanced by 1.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::Buf;
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"\x08 hello");
|
||||
/// assert_eq!(8, buf.get_u8());
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is no more remaining data in `self`.
|
||||
fn get_u8(&mut self) -> u8 {
|
||||
let mut buf = [0; 1];
|
||||
self.copy_to_slice(&mut buf);
|
||||
buf[0]
|
||||
}
|
||||
|
||||
/// Gets a signed 8 bit integer from `self`.
|
||||
///
|
||||
/// The current position is advanced by 1.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::Buf;
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"\x08 hello");
|
||||
/// assert_eq!(8, buf.get_i8());
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is no more remaining data in `self`.
|
||||
fn get_i8(&mut self) -> i8 {
|
||||
let mut buf = [0; 1];
|
||||
self.copy_to_slice(&mut buf);
|
||||
buf[0] as i8
|
||||
}
|
||||
|
||||
/// Gets an unsigned 16 bit integer from `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 2.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, BigEndian};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"\x08\x09 hello");
|
||||
/// assert_eq!(0x0809, buf.get_u16::<BigEndian>());
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining data in `self`.
|
||||
fn get_u16<T: ByteOrder>(&mut self) -> u16 {
|
||||
let mut buf = [0; 2];
|
||||
self.copy_to_slice(&mut buf);
|
||||
T::read_u16(&buf)
|
||||
}
|
||||
|
||||
/// Gets a signed 16 bit integer from `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 2.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, BigEndian};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"\x08\x09 hello");
|
||||
/// assert_eq!(0x0809, buf.get_i16::<BigEndian>());
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining data in `self`.
|
||||
fn get_i16<T: ByteOrder>(&mut self) -> i16 {
|
||||
let mut buf = [0; 2];
|
||||
self.copy_to_slice(&mut buf);
|
||||
T::read_i16(&buf)
|
||||
}
|
||||
|
||||
/// Gets an unsigned 32 bit integer from `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 4.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, BigEndian};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"\x08\x09\xA0\xA1 hello");
|
||||
/// assert_eq!(0x0809A0A1, buf.get_u32::<BigEndian>());
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining data in `self`.
|
||||
fn get_u32<T: ByteOrder>(&mut self) -> u32 {
|
||||
let mut buf = [0; 4];
|
||||
self.copy_to_slice(&mut buf);
|
||||
T::read_u32(&buf)
|
||||
}
|
||||
|
||||
/// Gets a signed 32 bit integer from `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 4.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, BigEndian};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"\x08\x09\xA0\xA1 hello");
|
||||
/// assert_eq!(0x0809A0A1, buf.get_i32::<BigEndian>());
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining data in `self`.
|
||||
fn get_i32<T: ByteOrder>(&mut self) -> i32 {
|
||||
let mut buf = [0; 4];
|
||||
self.copy_to_slice(&mut buf);
|
||||
T::read_i32(&buf)
|
||||
}
|
||||
|
||||
/// Gets an unsigned 64 bit integer from `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 8.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, BigEndian};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"\x01\x02\x03\x04\x05\x06\x07\x08 hello");
|
||||
/// assert_eq!(0x0102030405060708, buf.get_u64::<BigEndian>());
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining data in `self`.
|
||||
fn get_u64<T: ByteOrder>(&mut self) -> u64 {
|
||||
let mut buf = [0; 8];
|
||||
self.copy_to_slice(&mut buf);
|
||||
T::read_u64(&buf)
|
||||
}
|
||||
|
||||
/// Gets a signed 64 bit integer from `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 8.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, BigEndian};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"\x01\x02\x03\x04\x05\x06\x07\x08 hello");
|
||||
/// assert_eq!(0x0102030405060708, buf.get_i64::<BigEndian>());
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining data in `self`.
|
||||
fn get_i64<T: ByteOrder>(&mut self) -> i64 {
|
||||
let mut buf = [0; 8];
|
||||
self.copy_to_slice(&mut buf);
|
||||
T::read_i64(&buf)
|
||||
}
|
||||
|
||||
/// Gets an unsigned n-byte integer from `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by `nbytes`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, BigEndian};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"\x01\x02\x03 hello");
|
||||
/// assert_eq!(0x010203, buf.get_uint::<BigEndian>(3));
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining data in `self`.
|
||||
fn get_uint<T: ByteOrder>(&mut self, nbytes: usize) -> u64 {
|
||||
let mut buf = [0; 8];
|
||||
self.copy_to_slice(&mut buf[..nbytes]);
|
||||
T::read_uint(&buf[..nbytes], nbytes)
|
||||
}
|
||||
|
||||
/// Gets a signed n-byte integer from `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by `nbytes`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, BigEndian};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"\x01\x02\x03 hello");
|
||||
/// assert_eq!(0x010203, buf.get_int::<BigEndian>(3));
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining data in `self`.
|
||||
fn get_int<T: ByteOrder>(&mut self, nbytes: usize) -> i64 {
|
||||
let mut buf = [0; 8];
|
||||
self.copy_to_slice(&mut buf[..nbytes]);
|
||||
T::read_int(&buf[..nbytes], nbytes)
|
||||
}
|
||||
|
||||
/// Gets an IEEE754 single-precision (4 bytes) floating point number from
|
||||
/// `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 4.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, BigEndian};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"\x3F\x99\x99\x9A hello");
|
||||
/// assert_eq!(1.2f32, buf.get_f32::<BigEndian>());
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining data in `self`.
|
||||
fn get_f32<T: ByteOrder>(&mut self) -> f32 {
|
||||
let mut buf = [0; 4];
|
||||
self.copy_to_slice(&mut buf);
|
||||
T::read_f32(&buf)
|
||||
}
|
||||
|
||||
/// Gets an IEEE754 double-precision (8 bytes) floating point number from
|
||||
/// `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 8.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, BigEndian};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"\x3F\xF3\x33\x33\x33\x33\x33\x33 hello");
|
||||
/// assert_eq!(1.2f64, buf.get_f64::<BigEndian>());
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining data in `self`.
|
||||
fn get_f64<T: ByteOrder>(&mut self) -> f64 {
|
||||
let mut buf = [0; 8];
|
||||
self.copy_to_slice(&mut buf);
|
||||
T::read_f64(&buf)
|
||||
}
|
||||
|
||||
/// Transforms a `Buf` into a concrete buffer.
|
||||
///
|
||||
/// `collect()` can operate on any value that implements `Buf`, and turn it
|
||||
/// into the relevent concrete buffer type.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Collecting a buffer and loading the contents into a `Vec<u8>`.
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, Bytes, IntoBuf};
|
||||
///
|
||||
/// let buf = Bytes::from(&b"hello world"[..]).into_buf();
|
||||
/// let vec: Vec<u8> = buf.collect();
|
||||
///
|
||||
/// assert_eq!(vec, &b"hello world"[..]);
|
||||
/// ```
|
||||
fn collect<B>(self) -> B
|
||||
where Self: Sized,
|
||||
B: FromBuf,
|
||||
{
|
||||
B::from_buf(self)
|
||||
}
|
||||
|
||||
/// Creates an adaptor which will read at most `limit` bytes from `self`.
|
||||
///
|
||||
/// This function returns a new instance of `Buf` which will read at most
|
||||
/// `limit` bytes.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, BufMut};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new("hello world").take(5);
|
||||
/// let mut dst = vec![];
|
||||
///
|
||||
/// dst.put(&mut buf);
|
||||
/// assert_eq!(dst, b"hello");
|
||||
///
|
||||
/// let mut buf = buf.into_inner();
|
||||
/// dst.clear();
|
||||
/// dst.put(&mut buf);
|
||||
/// assert_eq!(dst, b" world");
|
||||
/// ```
|
||||
fn take(self, limit: usize) -> Take<Self>
|
||||
where Self: Sized
|
||||
{
|
||||
super::take::new(self, limit)
|
||||
}
|
||||
|
||||
/// Creates an adaptor which will chain this buffer with another.
|
||||
///
|
||||
/// The returned `Buf` instance will first consume all bytes from `self`.
|
||||
/// Afterwards the output is equivalent to the output of next.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Bytes, Buf, IntoBuf};
|
||||
/// use bytes::buf::Chain;
|
||||
///
|
||||
/// let buf = Bytes::from(&b"hello "[..]).into_buf()
|
||||
/// .chain(Bytes::from(&b"world"[..]));
|
||||
///
|
||||
/// let full: Bytes = buf.collect();
|
||||
/// assert_eq!(full[..], b"hello world"[..]);
|
||||
/// ```
|
||||
fn chain<U>(self, next: U) -> Chain<Self, U::Buf>
|
||||
where U: IntoBuf,
|
||||
Self: Sized,
|
||||
{
|
||||
Chain::new(self, next.into_buf())
|
||||
}
|
||||
|
||||
/// Creates a "by reference" adaptor for this instance of `Buf`.
|
||||
///
|
||||
/// The returned adaptor also implements `Buf` and will simply borrow `self`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, BufMut};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new("hello world");
|
||||
/// let mut dst = vec![];
|
||||
///
|
||||
/// {
|
||||
/// let mut reference = buf.by_ref();
|
||||
/// dst.put(&mut reference.take(5));
|
||||
/// assert_eq!(dst, b"hello");
|
||||
/// } // drop our &mut reference so we can use `buf` again
|
||||
///
|
||||
/// dst.clear();
|
||||
/// dst.put(&mut buf);
|
||||
/// assert_eq!(dst, b" world");
|
||||
/// ```
|
||||
fn by_ref(&mut self) -> &mut Self where Self: Sized {
|
||||
self
|
||||
}
|
||||
|
||||
/// Creates an adaptor which implements the `Read` trait for `self`.
|
||||
///
|
||||
/// This function returns a new value which implements `Read` by adapting
|
||||
/// the `Read` trait functions to the `Buf` trait functions. Given that
|
||||
/// `Buf` operations are infallible, none of the `Read` functions will
|
||||
/// return with `Err`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, IntoBuf, Bytes};
|
||||
/// use std::io::Read;
|
||||
///
|
||||
/// let buf = Bytes::from("hello world").into_buf();
|
||||
///
|
||||
/// let mut reader = buf.reader();
|
||||
/// let mut dst = [0; 1024];
|
||||
///
|
||||
/// let num = reader.read(&mut dst).unwrap();
|
||||
///
|
||||
/// assert_eq!(11, num);
|
||||
/// assert_eq!(&dst[..11], b"hello world");
|
||||
/// ```
|
||||
fn reader(self) -> Reader<Self> where Self: Sized {
|
||||
super::reader::new(self)
|
||||
}
|
||||
|
||||
/// Returns an iterator over the bytes contained by the buffer.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, IntoBuf, Bytes};
|
||||
///
|
||||
/// let buf = Bytes::from(&b"abc"[..]).into_buf();
|
||||
/// let mut iter = buf.iter();
|
||||
///
|
||||
/// assert_eq!(iter.next(), Some(b'a'));
|
||||
/// assert_eq!(iter.next(), Some(b'b'));
|
||||
/// assert_eq!(iter.next(), Some(b'c'));
|
||||
/// assert_eq!(iter.next(), None);
|
||||
/// ```
|
||||
fn iter(self) -> Iter<Self> where Self: Sized {
|
||||
super::iter::new(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T: Buf + ?Sized> Buf for &'a mut T {
|
||||
fn remaining(&self) -> usize {
|
||||
(**self).remaining()
|
||||
}
|
||||
|
||||
fn bytes(&self) -> &[u8] {
|
||||
(**self).bytes()
|
||||
}
|
||||
|
||||
fn bytes_vec<'b>(&'b self, dst: &mut [&'b IoVec]) -> usize {
|
||||
(**self).bytes_vec(dst)
|
||||
}
|
||||
|
||||
fn advance(&mut self, cnt: usize) {
|
||||
(**self).advance(cnt)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Buf + ?Sized> Buf for Box<T> {
|
||||
fn remaining(&self) -> usize {
|
||||
(**self).remaining()
|
||||
}
|
||||
|
||||
fn bytes(&self) -> &[u8] {
|
||||
(**self).bytes()
|
||||
}
|
||||
|
||||
fn bytes_vec<'b>(&'b self, dst: &mut [&'b IoVec]) -> usize {
|
||||
(**self).bytes_vec(dst)
|
||||
}
|
||||
|
||||
fn advance(&mut self, cnt: usize) {
|
||||
(**self).advance(cnt)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: AsRef<[u8]>> Buf for io::Cursor<T> {
|
||||
fn remaining(&self) -> usize {
|
||||
let len = self.get_ref().as_ref().len();
|
||||
let pos = self.position();
|
||||
|
||||
if pos >= len as u64 {
|
||||
return 0;
|
||||
}
|
||||
|
||||
len - pos as usize
|
||||
}
|
||||
|
||||
fn bytes(&self) -> &[u8] {
|
||||
let len = self.get_ref().as_ref().len();
|
||||
let pos = self.position() as usize;
|
||||
|
||||
if pos >= len {
|
||||
return Default::default();
|
||||
}
|
||||
|
||||
&(self.get_ref().as_ref())[pos..]
|
||||
}
|
||||
|
||||
fn advance(&mut self, cnt: usize) {
|
||||
let pos = (self.position() as usize)
|
||||
.checked_add(cnt).expect("overflow");
|
||||
|
||||
assert!(pos <= self.get_ref().as_ref().len());
|
||||
|
||||
self.set_position(pos as u64);
|
||||
}
|
||||
}
|
||||
|
||||
impl Buf for Option<[u8; 1]> {
|
||||
fn remaining(&self) -> usize {
|
||||
if self.is_some() {
|
||||
1
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
fn bytes(&self) -> &[u8] {
|
||||
self.as_ref().map(AsRef::as_ref)
|
||||
.unwrap_or(Default::default())
|
||||
}
|
||||
|
||||
fn advance(&mut self, cnt: usize) {
|
||||
if cnt == 0 {
|
||||
return;
|
||||
}
|
||||
|
||||
if self.is_none() {
|
||||
panic!("overflow");
|
||||
} else {
|
||||
assert_eq!(1, cnt);
|
||||
*self = None;
|
||||
}
|
||||
}
|
||||
}
|
736
third_party/rust/bytes/src/buf/buf_mut.rs
vendored
Normal file
736
third_party/rust/bytes/src/buf/buf_mut.rs
vendored
Normal file
@ -0,0 +1,736 @@
|
||||
use super::{IntoBuf, Writer};
|
||||
use byteorder::ByteOrder;
|
||||
use iovec::IoVec;
|
||||
|
||||
use std::{cmp, io, ptr, usize};
|
||||
|
||||
/// A trait for values that provide sequential write access to bytes.
|
||||
///
|
||||
/// Write bytes to a buffer
|
||||
///
|
||||
/// A buffer stores bytes in memory such that write operations are infallible.
|
||||
/// The underlying storage may or may not be in contiguous memory. A `BufMut`
|
||||
/// value is a cursor into the buffer. Writing to `BufMut` advances the cursor
|
||||
/// position.
|
||||
///
|
||||
/// The simplest `BufMut` is a `Vec<u8>`.
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::BufMut;
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
///
|
||||
/// buf.put("hello world");
|
||||
///
|
||||
/// assert_eq!(buf, b"hello world");
|
||||
/// ```
|
||||
pub trait BufMut {
|
||||
/// Returns the number of bytes that can be written from the current
|
||||
/// position until the end of the buffer is reached.
|
||||
///
|
||||
/// This value is greater than or equal to the length of the slice returned
|
||||
/// by `bytes_mut`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::BufMut;
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut dst = [0; 10];
|
||||
/// let mut buf = Cursor::new(&mut dst[..]);
|
||||
///
|
||||
/// assert_eq!(10, buf.remaining_mut());
|
||||
/// buf.put("hello");
|
||||
///
|
||||
/// assert_eq!(5, buf.remaining_mut());
|
||||
/// ```
|
||||
///
|
||||
/// # Implementer notes
|
||||
///
|
||||
/// Implementations of `remaining_mut` should ensure that the return value
|
||||
/// does not change unless a call is made to `advance_mut` or any other
|
||||
/// function that is documented to change the `BufMut`'s current position.
|
||||
fn remaining_mut(&self) -> usize;
|
||||
|
||||
/// Advance the internal cursor of the BufMut
|
||||
///
|
||||
/// The next call to `bytes_mut` will return a slice starting `cnt` bytes
|
||||
/// further into the underlying buffer.
|
||||
///
|
||||
/// This function is unsafe because there is no guarantee that the bytes
|
||||
/// being advanced past have been initialized.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::BufMut;
|
||||
///
|
||||
/// let mut buf = Vec::with_capacity(16);
|
||||
///
|
||||
/// unsafe {
|
||||
/// buf.bytes_mut()[0] = b'h';
|
||||
/// buf.bytes_mut()[1] = b'e';
|
||||
///
|
||||
/// buf.advance_mut(2);
|
||||
///
|
||||
/// buf.bytes_mut()[0] = b'l';
|
||||
/// buf.bytes_mut()[1..3].copy_from_slice(b"lo");
|
||||
///
|
||||
/// buf.advance_mut(3);
|
||||
/// }
|
||||
///
|
||||
/// assert_eq!(5, buf.len());
|
||||
/// assert_eq!(buf, b"hello");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function **may** panic if `cnt > self.remaining_mut()`.
|
||||
///
|
||||
/// # Implementer notes
|
||||
///
|
||||
/// It is recommended for implementations of `advance_mut` to panic if
|
||||
/// `cnt > self.remaining_mut()`. If the implementation does not panic,
|
||||
/// the call must behave as if `cnt == self.remaining_mut()`.
|
||||
///
|
||||
/// A call with `cnt == 0` should never panic and be a no-op.
|
||||
unsafe fn advance_mut(&mut self, cnt: usize);
|
||||
|
||||
/// Returns true if there is space in `self` for more bytes.
|
||||
///
|
||||
/// This is equivalent to `self.remaining_mut() != 0`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::BufMut;
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut dst = [0; 5];
|
||||
/// let mut buf = Cursor::new(&mut dst);
|
||||
///
|
||||
/// assert!(buf.has_remaining_mut());
|
||||
///
|
||||
/// buf.put("hello");
|
||||
///
|
||||
/// assert!(!buf.has_remaining_mut());
|
||||
/// ```
|
||||
fn has_remaining_mut(&self) -> bool {
|
||||
self.remaining_mut() > 0
|
||||
}
|
||||
|
||||
/// Returns a mutable slice starting at the current BufMut position and of
|
||||
/// length between 0 and `BufMut::remaining_mut()`.
|
||||
///
|
||||
/// This is a lower level function. Most operations are done with other
|
||||
/// functions.
|
||||
///
|
||||
/// The returned byte slice may represent uninitialized memory.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::BufMut;
|
||||
///
|
||||
/// let mut buf = Vec::with_capacity(16);
|
||||
///
|
||||
/// unsafe {
|
||||
/// buf.bytes_mut()[0] = b'h';
|
||||
/// buf.bytes_mut()[1] = b'e';
|
||||
///
|
||||
/// buf.advance_mut(2);
|
||||
///
|
||||
/// buf.bytes_mut()[0] = b'l';
|
||||
/// buf.bytes_mut()[1..3].copy_from_slice(b"lo");
|
||||
///
|
||||
/// buf.advance_mut(3);
|
||||
/// }
|
||||
///
|
||||
/// assert_eq!(5, buf.len());
|
||||
/// assert_eq!(buf, b"hello");
|
||||
/// ```
|
||||
///
|
||||
/// # Implementer notes
|
||||
///
|
||||
/// This function should never panic. `bytes_mut` should return an empty
|
||||
/// slice **if and only if** `remaining_mut` returns 0. In other words,
|
||||
/// `bytes_mut` returning an empty slice implies that `remaining_mut` will
|
||||
/// return 0 and `remaining_mut` returning 0 implies that `bytes_mut` will
|
||||
/// return an empty slice.
|
||||
unsafe fn bytes_mut(&mut self) -> &mut [u8];
|
||||
|
||||
/// Fills `dst` with potentially multiple mutable slices starting at `self`'s
|
||||
/// current position.
|
||||
///
|
||||
/// If the `BufMut` is backed by disjoint slices of bytes, `bytes_vec_mut`
|
||||
/// enables fetching more than one slice at once. `dst` is a slice of
|
||||
/// mutable `IoVec` references, enabling the slice to be directly used with
|
||||
/// [`readv`] without any further conversion. The sum of the lengths of all
|
||||
/// the buffers in `dst` will be less than or equal to
|
||||
/// `Buf::remaining_mut()`.
|
||||
///
|
||||
/// The entries in `dst` will be overwritten, but the data **contained** by
|
||||
/// the slices **will not** be modified. If `bytes_vec_mut` does not fill every
|
||||
/// entry in `dst`, then `dst` is guaranteed to contain all remaining slices
|
||||
/// in `self.
|
||||
///
|
||||
/// This is a lower level function. Most operations are done with other
|
||||
/// functions.
|
||||
///
|
||||
/// # Implementer notes
|
||||
///
|
||||
/// This function should never panic. Once the end of the buffer is reached,
|
||||
/// i.e., `BufMut::remaining_mut` returns 0, calls to `bytes_vec_mut` must
|
||||
/// return 0 without mutating `dst`.
|
||||
///
|
||||
/// Implementations should also take care to properly handle being called
|
||||
/// with `dst` being a zero length slice.
|
||||
///
|
||||
/// [`readv`]: http://man7.org/linux/man-pages/man2/readv.2.html
|
||||
unsafe fn bytes_vec_mut<'a>(&'a mut self, dst: &mut [&'a mut IoVec]) -> usize {
|
||||
if dst.is_empty() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if self.has_remaining_mut() {
|
||||
dst[0] = self.bytes_mut().into();
|
||||
1
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
/// Transfer bytes into `self` from `src` and advance the cursor by the
|
||||
/// number of bytes written.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::BufMut;
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
///
|
||||
/// buf.put(b'h');
|
||||
/// buf.put(&b"ello"[..]);
|
||||
/// buf.put(" world");
|
||||
///
|
||||
/// assert_eq!(buf, b"hello world");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if `self` does not have enough capacity to contain `src`.
|
||||
fn put<T: IntoBuf>(&mut self, src: T) where Self: Sized {
|
||||
use super::Buf;
|
||||
|
||||
let mut src = src.into_buf();
|
||||
|
||||
assert!(self.remaining_mut() >= src.remaining());
|
||||
|
||||
while src.has_remaining() {
|
||||
let l;
|
||||
|
||||
unsafe {
|
||||
let s = src.bytes();
|
||||
let d = self.bytes_mut();
|
||||
l = cmp::min(s.len(), d.len());
|
||||
|
||||
ptr::copy_nonoverlapping(
|
||||
s.as_ptr(),
|
||||
d.as_mut_ptr(),
|
||||
l);
|
||||
}
|
||||
|
||||
src.advance(l);
|
||||
unsafe { self.advance_mut(l); }
|
||||
}
|
||||
}
|
||||
|
||||
/// Transfer bytes into `self` from `src` and advance the cursor by the
|
||||
/// number of bytes written.
|
||||
///
|
||||
/// `self` must have enough remaining capacity to contain all of `src`.
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::BufMut;
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut dst = [0; 6];
|
||||
///
|
||||
/// {
|
||||
/// let mut buf = Cursor::new(&mut dst);
|
||||
/// buf.put_slice(b"hello");
|
||||
///
|
||||
/// assert_eq!(1, buf.remaining_mut());
|
||||
/// }
|
||||
///
|
||||
/// assert_eq!(b"hello\0", &dst);
|
||||
/// ```
|
||||
fn put_slice(&mut self, src: &[u8]) {
|
||||
let mut off = 0;
|
||||
|
||||
assert!(self.remaining_mut() >= src.len(), "buffer overflow");
|
||||
|
||||
while off < src.len() {
|
||||
let cnt;
|
||||
|
||||
unsafe {
|
||||
let dst = self.bytes_mut();
|
||||
cnt = cmp::min(dst.len(), src.len() - off);
|
||||
|
||||
ptr::copy_nonoverlapping(
|
||||
src[off..].as_ptr(),
|
||||
dst.as_mut_ptr(),
|
||||
cnt);
|
||||
|
||||
off += cnt;
|
||||
|
||||
}
|
||||
|
||||
unsafe { self.advance_mut(cnt); }
|
||||
}
|
||||
}
|
||||
|
||||
/// Writes an unsigned 8 bit integer to `self`.
|
||||
///
|
||||
/// The current position is advanced by 1.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::BufMut;
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
/// buf.put_u8(0x01);
|
||||
/// assert_eq!(buf, b"\x01");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining capacity in
|
||||
/// `self`.
|
||||
fn put_u8(&mut self, n: u8) {
|
||||
let src = [n];
|
||||
self.put_slice(&src);
|
||||
}
|
||||
|
||||
/// Writes a signed 8 bit integer to `self`.
|
||||
///
|
||||
/// The current position is advanced by 1.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::BufMut;
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
/// buf.put_i8(0x01);
|
||||
/// assert_eq!(buf, b"\x01");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining capacity in
|
||||
/// `self`.
|
||||
fn put_i8(&mut self, n: i8) {
|
||||
let src = [n as u8];
|
||||
self.put_slice(&src)
|
||||
}
|
||||
|
||||
/// Writes an unsigned 16 bit integer to `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 2.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{BufMut, BigEndian};
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
/// buf.put_u16::<BigEndian>(0x0809);
|
||||
/// assert_eq!(buf, b"\x08\x09");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining capacity in
|
||||
/// `self`.
|
||||
fn put_u16<T: ByteOrder>(&mut self, n: u16) {
|
||||
let mut buf = [0; 2];
|
||||
T::write_u16(&mut buf, n);
|
||||
self.put_slice(&buf)
|
||||
}
|
||||
|
||||
/// Writes a signed 16 bit integer to `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 2.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{BufMut, BigEndian};
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
/// buf.put_i16::<BigEndian>(0x0809);
|
||||
/// assert_eq!(buf, b"\x08\x09");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining capacity in
|
||||
/// `self`.
|
||||
fn put_i16<T: ByteOrder>(&mut self, n: i16) {
|
||||
let mut buf = [0; 2];
|
||||
T::write_i16(&mut buf, n);
|
||||
self.put_slice(&buf)
|
||||
}
|
||||
|
||||
/// Writes an unsigned 32 bit integer to `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 4.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{BufMut, BigEndian};
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
/// buf.put_u32::<BigEndian>(0x0809A0A1);
|
||||
/// assert_eq!(buf, b"\x08\x09\xA0\xA1");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining capacity in
|
||||
/// `self`.
|
||||
fn put_u32<T: ByteOrder>(&mut self, n: u32) {
|
||||
let mut buf = [0; 4];
|
||||
T::write_u32(&mut buf, n);
|
||||
self.put_slice(&buf)
|
||||
}
|
||||
|
||||
/// Writes a signed 32 bit integer to `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 4.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{BufMut, BigEndian};
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
/// buf.put_i32::<BigEndian>(0x0809A0A1);
|
||||
/// assert_eq!(buf, b"\x08\x09\xA0\xA1");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining capacity in
|
||||
/// `self`.
|
||||
fn put_i32<T: ByteOrder>(&mut self, n: i32) {
|
||||
let mut buf = [0; 4];
|
||||
T::write_i32(&mut buf, n);
|
||||
self.put_slice(&buf)
|
||||
}
|
||||
|
||||
/// Writes an unsigned 64 bit integer to `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 8.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{BufMut, BigEndian};
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
/// buf.put_u64::<BigEndian>(0x0102030405060708);
|
||||
/// assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining capacity in
|
||||
/// `self`.
|
||||
fn put_u64<T: ByteOrder>(&mut self, n: u64) {
|
||||
let mut buf = [0; 8];
|
||||
T::write_u64(&mut buf, n);
|
||||
self.put_slice(&buf)
|
||||
}
|
||||
|
||||
/// Writes a signed 64 bit integer to `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 8.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{BufMut, BigEndian};
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
/// buf.put_i64::<BigEndian>(0x0102030405060708);
|
||||
/// assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining capacity in
|
||||
/// `self`.
|
||||
fn put_i64<T: ByteOrder>(&mut self, n: i64) {
|
||||
let mut buf = [0; 8];
|
||||
T::write_i64(&mut buf, n);
|
||||
self.put_slice(&buf)
|
||||
}
|
||||
|
||||
/// Writes an unsigned n-byte integer to `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by `nbytes`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{BufMut, BigEndian};
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
/// buf.put_uint::<BigEndian>(0x010203, 3);
|
||||
/// assert_eq!(buf, b"\x01\x02\x03");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining capacity in
|
||||
/// `self`.
|
||||
fn put_uint<T: ByteOrder>(&mut self, n: u64, nbytes: usize) {
|
||||
let mut buf = [0; 8];
|
||||
T::write_uint(&mut buf, n, nbytes);
|
||||
self.put_slice(&buf[0..nbytes])
|
||||
}
|
||||
|
||||
/// Writes a signed n-byte integer to `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by `nbytes`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{BufMut, BigEndian};
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
/// buf.put_int::<BigEndian>(0x010203, 3);
|
||||
/// assert_eq!(buf, b"\x01\x02\x03");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining capacity in
|
||||
/// `self`.
|
||||
fn put_int<T: ByteOrder>(&mut self, n: i64, nbytes: usize) {
|
||||
let mut buf = [0; 8];
|
||||
T::write_int(&mut buf, n, nbytes);
|
||||
self.put_slice(&buf[0..nbytes])
|
||||
}
|
||||
|
||||
/// Writes an IEEE754 single-precision (4 bytes) floating point number to
|
||||
/// `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 4.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{BufMut, BigEndian};
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
/// buf.put_f32::<BigEndian>(1.2f32);
|
||||
/// assert_eq!(buf, b"\x3F\x99\x99\x9A");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining capacity in
|
||||
/// `self`.
|
||||
fn put_f32<T: ByteOrder>(&mut self, n: f32) {
|
||||
let mut buf = [0; 4];
|
||||
T::write_f32(&mut buf, n);
|
||||
self.put_slice(&buf)
|
||||
}
|
||||
|
||||
/// Writes an IEEE754 double-precision (8 bytes) floating point number to
|
||||
/// `self` in the specified byte order.
|
||||
///
|
||||
/// The current position is advanced by 8.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{BufMut, BigEndian};
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
/// buf.put_f64::<BigEndian>(1.2f64);
|
||||
/// assert_eq!(buf, b"\x3F\xF3\x33\x33\x33\x33\x33\x33");
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This function panics if there is not enough remaining capacity in
|
||||
/// `self`.
|
||||
fn put_f64<T: ByteOrder>(&mut self, n: f64) {
|
||||
let mut buf = [0; 8];
|
||||
T::write_f64(&mut buf, n);
|
||||
self.put_slice(&buf)
|
||||
}
|
||||
|
||||
/// Creates a "by reference" adaptor for this instance of `BufMut`.
|
||||
///
|
||||
/// The returned adapter also implements `BufMut` and will simply borrow
|
||||
/// `self`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::BufMut;
|
||||
/// use std::io;
|
||||
///
|
||||
/// let mut buf = vec![];
|
||||
///
|
||||
/// {
|
||||
/// let mut reference = buf.by_ref();
|
||||
///
|
||||
/// // Adapt reference to `std::io::Write`.
|
||||
/// let mut writer = reference.writer();
|
||||
///
|
||||
/// // Use the buffer as a writter
|
||||
/// io::Write::write(&mut writer, &b"hello world"[..]).unwrap();
|
||||
/// } // drop our &mut reference so that we can use `buf` again
|
||||
///
|
||||
/// assert_eq!(buf, &b"hello world"[..]);
|
||||
/// ```
|
||||
fn by_ref(&mut self) -> &mut Self where Self: Sized {
|
||||
self
|
||||
}
|
||||
|
||||
/// Creates an adaptor which implements the `Write` trait for `self`.
|
||||
///
|
||||
/// This function returns a new value which implements `Write` by adapting
|
||||
/// the `Write` trait functions to the `BufMut` trait functions. Given that
|
||||
/// `BufMut` operations are infallible, none of the `Write` functions will
|
||||
/// return with `Err`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::BufMut;
|
||||
/// use std::io::Write;
|
||||
///
|
||||
/// let mut buf = vec![].writer();
|
||||
///
|
||||
/// let num = buf.write(&b"hello world"[..]).unwrap();
|
||||
/// assert_eq!(11, num);
|
||||
///
|
||||
/// let buf = buf.into_inner();
|
||||
///
|
||||
/// assert_eq!(*buf, b"hello world"[..]);
|
||||
/// ```
|
||||
fn writer(self) -> Writer<Self> where Self: Sized {
|
||||
super::writer::new(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T: BufMut + ?Sized> BufMut for &'a mut T {
|
||||
fn remaining_mut(&self) -> usize {
|
||||
(**self).remaining_mut()
|
||||
}
|
||||
|
||||
unsafe fn bytes_mut(&mut self) -> &mut [u8] {
|
||||
(**self).bytes_mut()
|
||||
}
|
||||
|
||||
unsafe fn bytes_vec_mut<'b>(&'b mut self, dst: &mut [&'b mut IoVec]) -> usize {
|
||||
(**self).bytes_vec_mut(dst)
|
||||
}
|
||||
|
||||
unsafe fn advance_mut(&mut self, cnt: usize) {
|
||||
(**self).advance_mut(cnt)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: BufMut + ?Sized> BufMut for Box<T> {
|
||||
fn remaining_mut(&self) -> usize {
|
||||
(**self).remaining_mut()
|
||||
}
|
||||
|
||||
unsafe fn bytes_mut(&mut self) -> &mut [u8] {
|
||||
(**self).bytes_mut()
|
||||
}
|
||||
|
||||
unsafe fn bytes_vec_mut<'b>(&'b mut self, dst: &mut [&'b mut IoVec]) -> usize {
|
||||
(**self).bytes_vec_mut(dst)
|
||||
}
|
||||
|
||||
unsafe fn advance_mut(&mut self, cnt: usize) {
|
||||
(**self).advance_mut(cnt)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: AsMut<[u8]> + AsRef<[u8]>> BufMut for io::Cursor<T> {
|
||||
fn remaining_mut(&self) -> usize {
|
||||
use Buf;
|
||||
self.remaining()
|
||||
}
|
||||
|
||||
/// Advance the internal cursor of the BufMut
|
||||
unsafe fn advance_mut(&mut self, cnt: usize) {
|
||||
use Buf;
|
||||
self.advance(cnt);
|
||||
}
|
||||
|
||||
/// Returns a mutable slice starting at the current BufMut position and of
|
||||
/// length between 0 and `BufMut::remaining()`.
|
||||
///
|
||||
/// The returned byte slice may represent uninitialized memory.
|
||||
unsafe fn bytes_mut(&mut self) -> &mut [u8] {
|
||||
let len = self.get_ref().as_ref().len();
|
||||
let pos = self.position() as usize;
|
||||
|
||||
if pos >= len {
|
||||
return Default::default();
|
||||
}
|
||||
|
||||
&mut (self.get_mut().as_mut())[pos..]
|
||||
}
|
||||
}
|
||||
|
||||
impl BufMut for Vec<u8> {
|
||||
#[inline]
|
||||
fn remaining_mut(&self) -> usize {
|
||||
usize::MAX - self.len()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
unsafe fn advance_mut(&mut self, cnt: usize) {
|
||||
let len = self.len();
|
||||
let remaining = self.capacity() - len;
|
||||
if cnt > remaining {
|
||||
// Reserve additional capacity, and ensure that the total length
|
||||
// will not overflow usize.
|
||||
self.reserve(cnt);
|
||||
}
|
||||
|
||||
self.set_len(len + cnt);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
unsafe fn bytes_mut(&mut self) -> &mut [u8] {
|
||||
use std::slice;
|
||||
|
||||
if self.capacity() == self.len() {
|
||||
self.reserve(64); // Grow the vec
|
||||
}
|
||||
|
||||
let cap = self.capacity();
|
||||
let len = self.len();
|
||||
|
||||
let ptr = self.as_mut_ptr();
|
||||
&mut slice::from_raw_parts_mut(ptr, cap)[len..]
|
||||
}
|
||||
}
|
226
third_party/rust/bytes/src/buf/chain.rs
vendored
Normal file
226
third_party/rust/bytes/src/buf/chain.rs
vendored
Normal file
@ -0,0 +1,226 @@
|
||||
use {Buf, BufMut};
|
||||
use iovec::IoVec;
|
||||
|
||||
/// A `Chain` sequences two buffers.
|
||||
///
|
||||
/// `Chain` is an adapter that links two underlying buffers and provides a
|
||||
/// continous view across both buffers. It is able to sequence either immutable
|
||||
/// buffers ([`Buf`] values) or mutable buffers ([`BufMut`] values).
|
||||
///
|
||||
/// This struct is generally created by calling [`Buf::chain`]. Please see that
|
||||
/// function's documentation for more detail.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Bytes, Buf, IntoBuf};
|
||||
/// use bytes::buf::Chain;
|
||||
///
|
||||
/// let buf = Bytes::from(&b"hello "[..]).into_buf()
|
||||
/// .chain(Bytes::from(&b"world"[..]));
|
||||
///
|
||||
/// let full: Bytes = buf.collect();
|
||||
/// assert_eq!(full[..], b"hello world"[..]);
|
||||
/// ```
|
||||
///
|
||||
/// [`Buf::chain`]: trait.Buf.html#method.chain
|
||||
/// [`Buf`]: trait.Buf.html
|
||||
/// [`BufMut`]: trait.BufMut.html
|
||||
#[derive(Debug)]
|
||||
pub struct Chain<T, U> {
|
||||
a: T,
|
||||
b: U,
|
||||
}
|
||||
|
||||
impl<T, U> Chain<T, U> {
|
||||
/// Creates a new `Chain` sequencing the provided values.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::BytesMut;
|
||||
/// use bytes::buf::Chain;
|
||||
///
|
||||
/// let buf = Chain::new(
|
||||
/// BytesMut::with_capacity(1024),
|
||||
/// BytesMut::with_capacity(1024));
|
||||
///
|
||||
/// // Use the chained buffer
|
||||
/// ```
|
||||
pub fn new(a: T, b: U) -> Chain<T, U> {
|
||||
Chain {
|
||||
a: a,
|
||||
b: b,
|
||||
}
|
||||
}
|
||||
|
||||
/// Gets a reference to the first underlying `Buf`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Bytes, Buf, IntoBuf};
|
||||
///
|
||||
/// let buf = Bytes::from(&b"hello"[..]).into_buf()
|
||||
/// .chain(Bytes::from(&b"world"[..]));
|
||||
///
|
||||
/// assert_eq!(buf.first_ref().get_ref()[..], b"hello"[..]);
|
||||
/// ```
|
||||
pub fn first_ref(&self) -> &T {
|
||||
&self.a
|
||||
}
|
||||
|
||||
/// Gets a mutable reference to the first underlying `Buf`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Bytes, Buf, IntoBuf};
|
||||
///
|
||||
/// let mut buf = Bytes::from(&b"hello "[..]).into_buf()
|
||||
/// .chain(Bytes::from(&b"world"[..]));
|
||||
///
|
||||
/// buf.first_mut().set_position(1);
|
||||
///
|
||||
/// let full: Bytes = buf.collect();
|
||||
/// assert_eq!(full[..], b"ello world"[..]);
|
||||
/// ```
|
||||
pub fn first_mut(&mut self) -> &mut T {
|
||||
&mut self.a
|
||||
}
|
||||
|
||||
/// Gets a reference to the last underlying `Buf`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Bytes, Buf, IntoBuf};
|
||||
///
|
||||
/// let buf = Bytes::from(&b"hello"[..]).into_buf()
|
||||
/// .chain(Bytes::from(&b"world"[..]));
|
||||
///
|
||||
/// assert_eq!(buf.last_ref().get_ref()[..], b"world"[..]);
|
||||
/// ```
|
||||
pub fn last_ref(&self) -> &U {
|
||||
&self.b
|
||||
}
|
||||
|
||||
/// Gets a mutable reference to the last underlying `Buf`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Bytes, Buf, IntoBuf};
|
||||
///
|
||||
/// let mut buf = Bytes::from(&b"hello "[..]).into_buf()
|
||||
/// .chain(Bytes::from(&b"world"[..]));
|
||||
///
|
||||
/// buf.last_mut().set_position(1);
|
||||
///
|
||||
/// let full: Bytes = buf.collect();
|
||||
/// assert_eq!(full[..], b"hello orld"[..]);
|
||||
/// ```
|
||||
pub fn last_mut(&mut self) -> &mut U {
|
||||
&mut self.b
|
||||
}
|
||||
|
||||
/// Consumes this `Chain`, returning the underlying values.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Bytes, Buf, IntoBuf};
|
||||
///
|
||||
/// let buf = Bytes::from(&b"hello"[..]).into_buf()
|
||||
/// .chain(Bytes::from(&b"world"[..]));
|
||||
///
|
||||
/// let (first, last) = buf.into_inner();
|
||||
/// assert_eq!(first.get_ref()[..], b"hello"[..]);
|
||||
/// assert_eq!(last.get_ref()[..], b"world"[..]);
|
||||
/// ```
|
||||
pub fn into_inner(self) -> (T, U) {
|
||||
(self.a, self.b)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, U> Buf for Chain<T, U>
|
||||
where T: Buf,
|
||||
U: Buf,
|
||||
{
|
||||
fn remaining(&self) -> usize {
|
||||
self.a.remaining() + self.b.remaining()
|
||||
}
|
||||
|
||||
fn bytes(&self) -> &[u8] {
|
||||
if self.a.has_remaining() {
|
||||
self.a.bytes()
|
||||
} else {
|
||||
self.b.bytes()
|
||||
}
|
||||
}
|
||||
|
||||
fn advance(&mut self, mut cnt: usize) {
|
||||
let a_rem = self.a.remaining();
|
||||
|
||||
if a_rem != 0 {
|
||||
if a_rem >= cnt {
|
||||
self.a.advance(cnt);
|
||||
return;
|
||||
}
|
||||
|
||||
// Consume what is left of a
|
||||
self.a.advance(a_rem);
|
||||
|
||||
cnt -= a_rem;
|
||||
}
|
||||
|
||||
self.b.advance(cnt);
|
||||
}
|
||||
|
||||
fn bytes_vec<'a>(&'a self, dst: &mut [&'a IoVec]) -> usize {
|
||||
let mut n = self.a.bytes_vec(dst);
|
||||
n += self.b.bytes_vec(&mut dst[n..]);
|
||||
n
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, U> BufMut for Chain<T, U>
|
||||
where T: BufMut,
|
||||
U: BufMut,
|
||||
{
|
||||
fn remaining_mut(&self) -> usize {
|
||||
self.a.remaining_mut() + self.b.remaining_mut()
|
||||
}
|
||||
|
||||
unsafe fn bytes_mut(&mut self) -> &mut [u8] {
|
||||
if self.a.has_remaining_mut() {
|
||||
self.a.bytes_mut()
|
||||
} else {
|
||||
self.b.bytes_mut()
|
||||
}
|
||||
}
|
||||
|
||||
unsafe fn advance_mut(&mut self, mut cnt: usize) {
|
||||
let a_rem = self.a.remaining_mut();
|
||||
|
||||
if a_rem != 0 {
|
||||
if a_rem >= cnt {
|
||||
self.a.advance_mut(cnt);
|
||||
return;
|
||||
}
|
||||
|
||||
// Consume what is left of a
|
||||
self.a.advance_mut(a_rem);
|
||||
|
||||
cnt -= a_rem;
|
||||
}
|
||||
|
||||
self.b.advance_mut(cnt);
|
||||
}
|
||||
|
||||
unsafe fn bytes_vec_mut<'a>(&'a mut self, dst: &mut [&'a mut IoVec]) -> usize {
|
||||
let mut n = self.a.bytes_vec_mut(dst);
|
||||
n += self.b.bytes_vec_mut(&mut dst[n..]);
|
||||
n
|
||||
}
|
||||
}
|
117
third_party/rust/bytes/src/buf/from_buf.rs
vendored
Normal file
117
third_party/rust/bytes/src/buf/from_buf.rs
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
use {Buf, BufMut, IntoBuf, Bytes, BytesMut};
|
||||
|
||||
/// Conversion from a [`Buf`]
|
||||
///
|
||||
/// Implementing `FromBuf` for a type defines how it is created from a buffer.
|
||||
/// This is common for types which represent byte storage of some kind.
|
||||
///
|
||||
/// [`FromBuf::from_buf`] is rarely called explicitly, and it is instead used
|
||||
/// through [`Buf::collect`]. See [`Buf::collect`] documentation for more examples.
|
||||
///
|
||||
/// See also [`IntoBuf`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Bytes, IntoBuf};
|
||||
/// use bytes::buf::FromBuf;
|
||||
///
|
||||
/// let buf = Bytes::from(&b"hello world"[..]).into_buf();
|
||||
/// let vec = Vec::from_buf(buf);
|
||||
///
|
||||
/// assert_eq!(vec, &b"hello world"[..]);
|
||||
/// ```
|
||||
///
|
||||
/// Using [`Buf::collect`] to implicitly use `FromBuf`:
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, Bytes, IntoBuf};
|
||||
///
|
||||
/// let buf = Bytes::from(&b"hello world"[..]).into_buf();
|
||||
/// let vec: Vec<u8> = buf.collect();
|
||||
///
|
||||
/// assert_eq!(vec, &b"hello world"[..]);
|
||||
/// ```
|
||||
///
|
||||
/// Implementing `FromBuf` for your type:
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{BufMut, Bytes};
|
||||
/// use bytes::buf::{IntoBuf, FromBuf};
|
||||
///
|
||||
/// // A sample buffer, that's just a wrapper over Vec<u8>
|
||||
/// struct MyBuffer(Vec<u8>);
|
||||
///
|
||||
/// impl FromBuf for MyBuffer {
|
||||
/// fn from_buf<B>(buf: B) -> Self where B: IntoBuf {
|
||||
/// let mut v = Vec::new();
|
||||
/// v.put(buf.into_buf());
|
||||
/// MyBuffer(v)
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// // Now we can make a new buf
|
||||
/// let buf = Bytes::from(&b"hello world"[..]);
|
||||
///
|
||||
/// // And make a MyBuffer out of it
|
||||
/// let my_buf = MyBuffer::from_buf(buf);
|
||||
///
|
||||
/// assert_eq!(my_buf.0, &b"hello world"[..]);
|
||||
/// ```
|
||||
///
|
||||
/// [`Buf`]: trait.Buf.html
|
||||
/// [`FromBuf::from_buf`]: #method.from_buf
|
||||
/// [`Buf::collect`]: trait.Buf.html#method.collect
|
||||
/// [`IntoBuf`]: trait.IntoBuf.html
|
||||
pub trait FromBuf {
|
||||
/// Creates a value from a buffer.
|
||||
///
|
||||
/// See the [type-level documentation](#) for more details.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Bytes, IntoBuf};
|
||||
/// use bytes::buf::FromBuf;
|
||||
///
|
||||
/// let buf = Bytes::from(&b"hello world"[..]).into_buf();
|
||||
/// let vec = Vec::from_buf(buf);
|
||||
///
|
||||
/// assert_eq!(vec, &b"hello world"[..]);
|
||||
/// ```
|
||||
fn from_buf<T>(buf: T) -> Self where T: IntoBuf;
|
||||
}
|
||||
|
||||
impl FromBuf for Vec<u8> {
|
||||
fn from_buf<T>(buf: T) -> Self
|
||||
where T: IntoBuf
|
||||
{
|
||||
let buf = buf.into_buf();
|
||||
let mut ret = Vec::with_capacity(buf.remaining());
|
||||
ret.put(buf);
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
impl FromBuf for Bytes {
|
||||
fn from_buf<T>(buf: T) -> Self
|
||||
where T: IntoBuf
|
||||
{
|
||||
BytesMut::from_buf(buf).freeze()
|
||||
}
|
||||
}
|
||||
|
||||
impl FromBuf for BytesMut {
|
||||
fn from_buf<T>(buf: T) -> Self
|
||||
where T: IntoBuf
|
||||
{
|
||||
let buf = buf.into_buf();
|
||||
let mut ret = BytesMut::with_capacity(buf.remaining());
|
||||
ret.put(buf);
|
||||
ret
|
||||
}
|
||||
}
|
138
third_party/rust/bytes/src/buf/into_buf.rs
vendored
Normal file
138
third_party/rust/bytes/src/buf/into_buf.rs
vendored
Normal file
@ -0,0 +1,138 @@
|
||||
use super::{Buf};
|
||||
|
||||
use std::io;
|
||||
|
||||
/// Conversion into a `Buf`
|
||||
///
|
||||
/// An `IntoBuf` implementation defines how to convert a value into a `Buf`.
|
||||
/// This is common for types that represent byte storage of some kind. `IntoBuf`
|
||||
/// may be implemented directly for types or on references for those types.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, IntoBuf, BigEndian};
|
||||
///
|
||||
/// let bytes = b"\x00\x01hello world";
|
||||
/// let mut buf = bytes.into_buf();
|
||||
///
|
||||
/// assert_eq!(1, buf.get_u16::<BigEndian>());
|
||||
///
|
||||
/// let mut rest = [0; 11];
|
||||
/// buf.copy_to_slice(&mut rest);
|
||||
///
|
||||
/// assert_eq!(b"hello world", &rest);
|
||||
/// ```
|
||||
pub trait IntoBuf {
|
||||
/// The `Buf` type that `self` is being converted into
|
||||
type Buf: Buf;
|
||||
|
||||
/// Creates a `Buf` from a value.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, IntoBuf, BigEndian};
|
||||
///
|
||||
/// let bytes = b"\x00\x01hello world";
|
||||
/// let mut buf = bytes.into_buf();
|
||||
///
|
||||
/// assert_eq!(1, buf.get_u16::<BigEndian>());
|
||||
///
|
||||
/// let mut rest = [0; 11];
|
||||
/// buf.copy_to_slice(&mut rest);
|
||||
///
|
||||
/// assert_eq!(b"hello world", &rest);
|
||||
/// ```
|
||||
fn into_buf(self) -> Self::Buf;
|
||||
}
|
||||
|
||||
impl<T: Buf> IntoBuf for T {
|
||||
type Buf = Self;
|
||||
|
||||
fn into_buf(self) -> Self {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoBuf for &'a [u8] {
|
||||
type Buf = io::Cursor<&'a [u8]>;
|
||||
|
||||
fn into_buf(self) -> Self::Buf {
|
||||
io::Cursor::new(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoBuf for &'a str {
|
||||
type Buf = io::Cursor<&'a [u8]>;
|
||||
|
||||
fn into_buf(self) -> Self::Buf {
|
||||
self.as_bytes().into_buf()
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoBuf for Vec<u8> {
|
||||
type Buf = io::Cursor<Vec<u8>>;
|
||||
|
||||
fn into_buf(self) -> Self::Buf {
|
||||
io::Cursor::new(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoBuf for &'a Vec<u8> {
|
||||
type Buf = io::Cursor<&'a [u8]>;
|
||||
|
||||
fn into_buf(self) -> Self::Buf {
|
||||
io::Cursor::new(&self[..])
|
||||
}
|
||||
}
|
||||
|
||||
// Kind of annoying... but this impl is required to allow passing `&'static
|
||||
// [u8]` where for<'a> &'a T: IntoBuf is required.
|
||||
impl<'a> IntoBuf for &'a &'static [u8] {
|
||||
type Buf = io::Cursor<&'static [u8]>;
|
||||
|
||||
fn into_buf(self) -> Self::Buf {
|
||||
io::Cursor::new(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoBuf for &'a &'static str {
|
||||
type Buf = io::Cursor<&'static [u8]>;
|
||||
|
||||
fn into_buf(self) -> Self::Buf {
|
||||
self.as_bytes().into_buf()
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoBuf for String {
|
||||
type Buf = io::Cursor<Vec<u8>>;
|
||||
|
||||
fn into_buf(self) -> Self::Buf {
|
||||
self.into_bytes().into_buf()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoBuf for &'a String {
|
||||
type Buf = io::Cursor<&'a [u8]>;
|
||||
|
||||
fn into_buf(self) -> Self::Buf {
|
||||
self.as_bytes().into_buf()
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoBuf for u8 {
|
||||
type Buf = Option<[u8; 1]>;
|
||||
|
||||
fn into_buf(self) -> Self::Buf {
|
||||
Some([self])
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoBuf for i8 {
|
||||
type Buf = Option<[u8; 1]>;
|
||||
|
||||
fn into_buf(self) -> Self::Buf {
|
||||
Some([self as u8; 1])
|
||||
}
|
||||
}
|
116
third_party/rust/bytes/src/buf/iter.rs
vendored
Normal file
116
third_party/rust/bytes/src/buf/iter.rs
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
use Buf;
|
||||
|
||||
/// Iterator over the bytes contained by the buffer.
|
||||
///
|
||||
/// This struct is created by the [`iter`] method on [`Buf`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use bytes::{Buf, IntoBuf, Bytes};
|
||||
///
|
||||
/// let buf = Bytes::from(&b"abc"[..]).into_buf();
|
||||
/// let mut iter = buf.iter();
|
||||
///
|
||||
/// assert_eq!(iter.next(), Some(b'a'));
|
||||
/// assert_eq!(iter.next(), Some(b'b'));
|
||||
/// assert_eq!(iter.next(), Some(b'c'));
|
||||
/// assert_eq!(iter.next(), None);
|
||||
/// ```
|
||||
///
|
||||
/// [`iter`]: trait.Buf.html#method.iter
|
||||
/// [`Buf`]: trait.Buf.html
|
||||
#[derive(Debug)]
|
||||
pub struct Iter<T> {
|
||||
inner: T,
|
||||
}
|
||||
|
||||
impl<T> Iter<T> {
|
||||
/// Consumes this `Iter`, returning the underlying value.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::{Buf, IntoBuf, Bytes};
|
||||
///
|
||||
/// let buf = Bytes::from(&b"abc"[..]).into_buf();
|
||||
/// let mut iter = buf.iter();
|
||||
///
|
||||
/// assert_eq!(iter.next(), Some(b'a'));
|
||||
///
|
||||
/// let buf = iter.into_inner();
|
||||
/// assert_eq!(2, buf.remaining());
|
||||
/// ```
|
||||
pub fn into_inner(self) -> T {
|
||||
self.inner
|
||||
}
|
||||
|
||||
/// Gets a reference to the underlying `Buf`.
|
||||
///
|
||||
/// It is inadvisable to directly read from the underlying `Buf`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::{Buf, IntoBuf, Bytes};
|
||||
///
|
||||
/// let buf = Bytes::from(&b"abc"[..]).into_buf();
|
||||
/// let mut iter = buf.iter();
|
||||
///
|
||||
/// assert_eq!(iter.next(), Some(b'a'));
|
||||
///
|
||||
/// assert_eq!(2, iter.get_ref().remaining());
|
||||
/// ```
|
||||
pub fn get_ref(&self) -> &T {
|
||||
&self.inner
|
||||
}
|
||||
|
||||
/// Gets a mutable reference to the underlying `Buf`.
|
||||
///
|
||||
/// It is inadvisable to directly read from the underlying `Buf`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::{Buf, IntoBuf, BytesMut};
|
||||
///
|
||||
/// let buf = BytesMut::from(&b"abc"[..]).into_buf();
|
||||
/// let mut iter = buf.iter();
|
||||
///
|
||||
/// assert_eq!(iter.next(), Some(b'a'));
|
||||
///
|
||||
/// iter.get_mut().set_position(0);
|
||||
///
|
||||
/// assert_eq!(iter.next(), Some(b'a'));
|
||||
/// ```
|
||||
pub fn get_mut(&mut self) -> &mut T {
|
||||
&mut self.inner
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new<T>(inner: T) -> Iter<T> {
|
||||
Iter { inner: inner }
|
||||
}
|
||||
|
||||
impl<T: Buf> Iterator for Iter<T> {
|
||||
type Item = u8;
|
||||
|
||||
fn next(&mut self) -> Option<u8> {
|
||||
if !self.inner.has_remaining() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let b = self.inner.bytes()[0];
|
||||
self.inner.advance(1);
|
||||
Some(b)
|
||||
}
|
||||
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
let rem = self.inner.remaining();
|
||||
(rem, Some(rem))
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Buf> ExactSizeIterator for Iter<T> { }
|
37
third_party/rust/bytes/src/buf/mod.rs
vendored
Normal file
37
third_party/rust/bytes/src/buf/mod.rs
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
//! Utilities for working with buffers.
|
||||
//!
|
||||
//! A buffer is any structure that contains a sequence of bytes. The bytes may
|
||||
//! or may not be stored in contiguous memory. This module contains traits used
|
||||
//! to abstract over buffers as well as utilities for working with buffer types.
|
||||
//!
|
||||
//! # `Buf`, `BufMut`
|
||||
//!
|
||||
//! These are the two foundational traits for abstractly working with buffers.
|
||||
//! They can be thought as iterators for byte structures. They offer additional
|
||||
//! performance over `Iterator` by providing an API optimized for byte slices.
|
||||
//!
|
||||
//! See [`Buf`] and [`BufMut`] for more details.
|
||||
//!
|
||||
//! [rope]: https://en.wikipedia.org/wiki/Rope_(data_structure)
|
||||
//! [`Buf`]: trait.Buf.html
|
||||
//! [`BufMut`]: trait.BufMut.html
|
||||
|
||||
mod buf;
|
||||
mod buf_mut;
|
||||
mod from_buf;
|
||||
mod chain;
|
||||
mod into_buf;
|
||||
mod iter;
|
||||
mod reader;
|
||||
mod take;
|
||||
mod writer;
|
||||
|
||||
pub use self::buf::Buf;
|
||||
pub use self::buf_mut::BufMut;
|
||||
pub use self::from_buf::FromBuf;
|
||||
pub use self::chain::Chain;
|
||||
pub use self::into_buf::IntoBuf;
|
||||
pub use self::iter::Iter;
|
||||
pub use self::reader::Reader;
|
||||
pub use self::take::Take;
|
||||
pub use self::writer::Writer;
|
88
third_party/rust/bytes/src/buf/reader.rs
vendored
Normal file
88
third_party/rust/bytes/src/buf/reader.rs
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
use {Buf};
|
||||
|
||||
use std::{cmp, io};
|
||||
|
||||
/// A `Buf` adapter which implements `io::Read` for the inner value.
|
||||
///
|
||||
/// This struct is generally created by calling `reader()` on `Buf`. See
|
||||
/// documentation of [`reader()`](trait.Buf.html#method.reader) for more
|
||||
/// details.
|
||||
#[derive(Debug)]
|
||||
pub struct Reader<B> {
|
||||
buf: B,
|
||||
}
|
||||
|
||||
pub fn new<B>(buf: B) -> Reader<B> {
|
||||
Reader { buf: buf }
|
||||
}
|
||||
|
||||
impl<B: Buf> Reader<B> {
|
||||
/// Gets a reference to the underlying `Buf`.
|
||||
///
|
||||
/// It is inadvisable to directly read from the underlying `Buf`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::Buf;
|
||||
/// use std::io::{self, Cursor};
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world").reader();
|
||||
///
|
||||
/// assert_eq!(0, buf.get_ref().position());
|
||||
/// ```
|
||||
pub fn get_ref(&self) -> &B {
|
||||
&self.buf
|
||||
}
|
||||
|
||||
/// Gets a mutable reference to the underlying `Buf`.
|
||||
///
|
||||
/// It is inadvisable to directly read from the underlying `Buf`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::Buf;
|
||||
/// use std::io::{self, Cursor};
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world").reader();
|
||||
/// let mut dst = vec![];
|
||||
///
|
||||
/// buf.get_mut().set_position(2);
|
||||
/// io::copy(&mut buf, &mut dst).unwrap();
|
||||
///
|
||||
/// assert_eq!(*dst, b"llo world"[..]);
|
||||
/// ```
|
||||
pub fn get_mut(&mut self) -> &mut B {
|
||||
&mut self.buf
|
||||
}
|
||||
|
||||
/// Consumes this `Reader`, returning the underlying value.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::Buf;
|
||||
/// use std::io::{self, Cursor};
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world").reader();
|
||||
/// let mut dst = vec![];
|
||||
///
|
||||
/// io::copy(&mut buf, &mut dst).unwrap();
|
||||
///
|
||||
/// let buf = buf.into_inner();
|
||||
/// assert_eq!(0, buf.remaining());
|
||||
/// ```
|
||||
pub fn into_inner(self) -> B {
|
||||
self.buf
|
||||
}
|
||||
}
|
||||
|
||||
impl<B: Buf + Sized> io::Read for Reader<B> {
|
||||
fn read(&mut self, dst: &mut [u8]) -> io::Result<usize> {
|
||||
let len = cmp::min(self.buf.remaining(), dst.len());
|
||||
|
||||
Buf::copy_to_slice(&mut self.buf, &mut dst[0..len]);
|
||||
Ok(len)
|
||||
}
|
||||
}
|
155
third_party/rust/bytes/src/buf/take.rs
vendored
Normal file
155
third_party/rust/bytes/src/buf/take.rs
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
use {Buf};
|
||||
|
||||
use std::cmp;
|
||||
|
||||
/// A `Buf` adapter which limits the bytes read from an underlying buffer.
|
||||
///
|
||||
/// This struct is generally created by calling `take()` on `Buf`. See
|
||||
/// documentation of [`take()`](trait.Buf.html#method.take) for more details.
|
||||
#[derive(Debug)]
|
||||
pub struct Take<T> {
|
||||
inner: T,
|
||||
limit: usize,
|
||||
}
|
||||
|
||||
pub fn new<T>(inner: T, limit: usize) -> Take<T> {
|
||||
Take {
|
||||
inner: inner,
|
||||
limit: limit,
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Take<T> {
|
||||
/// Consumes this `Take`, returning the underlying value.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::{Buf, BufMut};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world").take(2);
|
||||
/// let mut dst = vec![];
|
||||
///
|
||||
/// dst.put(&mut buf);
|
||||
/// assert_eq!(*dst, b"he"[..]);
|
||||
///
|
||||
/// let mut buf = buf.into_inner();
|
||||
///
|
||||
/// dst.clear();
|
||||
/// dst.put(&mut buf);
|
||||
/// assert_eq!(*dst, b"llo world"[..]);
|
||||
/// ```
|
||||
pub fn into_inner(self) -> T {
|
||||
self.inner
|
||||
}
|
||||
|
||||
/// Gets a reference to the underlying `Buf`.
|
||||
///
|
||||
/// It is inadvisable to directly read from the underlying `Buf`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::{Buf, BufMut};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world").take(2);
|
||||
///
|
||||
/// assert_eq!(0, buf.get_ref().position());
|
||||
/// ```
|
||||
pub fn get_ref(&self) -> &T {
|
||||
&self.inner
|
||||
}
|
||||
|
||||
/// Gets a mutable reference to the underlying `Buf`.
|
||||
///
|
||||
/// It is inadvisable to directly read from the underlying `Buf`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::{Buf, BufMut};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world").take(2);
|
||||
/// let mut dst = vec![];
|
||||
///
|
||||
/// buf.get_mut().set_position(2);
|
||||
///
|
||||
/// dst.put(&mut buf);
|
||||
/// assert_eq!(*dst, b"ll"[..]);
|
||||
/// ```
|
||||
pub fn get_mut(&mut self) -> &mut T {
|
||||
&mut self.inner
|
||||
}
|
||||
|
||||
/// Returns the maximum number of bytes that can be read.
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// If the inner `Buf` has fewer bytes than indicated by this method then
|
||||
/// that is the actual number of available bytes.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::Buf;
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world").take(2);
|
||||
///
|
||||
/// assert_eq!(2, buf.limit());
|
||||
/// assert_eq!(b'h', buf.get_u8());
|
||||
/// assert_eq!(1, buf.limit());
|
||||
/// ```
|
||||
pub fn limit(&self) -> usize {
|
||||
self.limit
|
||||
}
|
||||
|
||||
/// Sets the maximum number of bytes that can be read.
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// If the inner `Buf` has fewer bytes than `lim` then that is the actual
|
||||
/// number of available bytes.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::{Buf, BufMut};
|
||||
/// use std::io::Cursor;
|
||||
///
|
||||
/// let mut buf = Cursor::new(b"hello world").take(2);
|
||||
/// let mut dst = vec![];
|
||||
///
|
||||
/// dst.put(&mut buf);
|
||||
/// assert_eq!(*dst, b"he"[..]);
|
||||
///
|
||||
/// dst.clear();
|
||||
///
|
||||
/// buf.set_limit(3);
|
||||
/// dst.put(&mut buf);
|
||||
/// assert_eq!(*dst, b"llo"[..]);
|
||||
/// ```
|
||||
pub fn set_limit(&mut self, lim: usize) {
|
||||
self.limit = lim
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Buf> Buf for Take<T> {
|
||||
fn remaining(&self) -> usize {
|
||||
cmp::min(self.inner.remaining(), self.limit)
|
||||
}
|
||||
|
||||
fn bytes(&self) -> &[u8] {
|
||||
let bytes = self.inner.bytes();
|
||||
&bytes[..cmp::min(bytes.len(), self.limit)]
|
||||
}
|
||||
|
||||
fn advance(&mut self, cnt: usize) {
|
||||
assert!(cnt <= self.limit);
|
||||
self.inner.advance(cnt);
|
||||
self.limit -= cnt;
|
||||
}
|
||||
}
|
88
third_party/rust/bytes/src/buf/writer.rs
vendored
Normal file
88
third_party/rust/bytes/src/buf/writer.rs
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
use BufMut;
|
||||
|
||||
use std::{cmp, io};
|
||||
|
||||
/// A `BufMut` adapter which implements `io::Write` for the inner value.
|
||||
///
|
||||
/// This struct is generally created by calling `writer()` on `BufMut`. See
|
||||
/// documentation of [`writer()`](trait.BufMut.html#method.writer) for more
|
||||
/// details.
|
||||
#[derive(Debug)]
|
||||
pub struct Writer<B> {
|
||||
buf: B,
|
||||
}
|
||||
|
||||
pub fn new<B>(buf: B) -> Writer<B> {
|
||||
Writer { buf: buf }
|
||||
}
|
||||
|
||||
impl<B: BufMut> Writer<B> {
|
||||
/// Gets a reference to the underlying `BufMut`.
|
||||
///
|
||||
/// It is inadvisable to directly write to the underlying `BufMut`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::BufMut;
|
||||
///
|
||||
/// let mut buf = Vec::with_capacity(1024).writer();
|
||||
///
|
||||
/// assert_eq!(1024, buf.get_ref().capacity());
|
||||
/// ```
|
||||
pub fn get_ref(&self) -> &B {
|
||||
&self.buf
|
||||
}
|
||||
|
||||
/// Gets a mutable reference to the underlying `BufMut`.
|
||||
///
|
||||
/// It is inadvisable to directly write to the underlying `BufMut`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::BufMut;
|
||||
///
|
||||
/// let mut buf = vec![].writer();
|
||||
///
|
||||
/// buf.get_mut().reserve(1024);
|
||||
///
|
||||
/// assert_eq!(1024, buf.get_ref().capacity());
|
||||
/// ```
|
||||
pub fn get_mut(&mut self) -> &mut B {
|
||||
&mut self.buf
|
||||
}
|
||||
|
||||
/// Consumes this `Writer`, returning the underlying value.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use bytes::BufMut;
|
||||
/// use std::io::{self, Cursor};
|
||||
///
|
||||
/// let mut buf = vec![].writer();
|
||||
/// let mut src = Cursor::new(b"hello world");
|
||||
///
|
||||
/// io::copy(&mut src, &mut buf).unwrap();
|
||||
///
|
||||
/// let buf = buf.into_inner();
|
||||
/// assert_eq!(*buf, b"hello world"[..]);
|
||||
/// ```
|
||||
pub fn into_inner(self) -> B {
|
||||
self.buf
|
||||
}
|
||||
}
|
||||
|
||||
impl<B: BufMut + Sized> io::Write for Writer<B> {
|
||||
fn write(&mut self, src: &[u8]) -> io::Result<usize> {
|
||||
let n = cmp::min(self.buf.remaining_mut(), src.len());
|
||||
|
||||
self.buf.put(&src[0..n]);
|
||||
Ok(n)
|
||||
}
|
||||
|
||||
fn flush(&mut self) -> io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
2571
third_party/rust/bytes/src/bytes.rs
vendored
Normal file
2571
third_party/rust/bytes/src/bytes.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
40
third_party/rust/bytes/src/debug.rs
vendored
Normal file
40
third_party/rust/bytes/src/debug.rs
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
use std::fmt;
|
||||
|
||||
/// Alternative implementation of `fmt::Debug` for byte slice.
|
||||
///
|
||||
/// Standard `Debug` implementation for `[u8]` is comma separated
|
||||
/// list of numbers. Since large amount of byte strings are in fact
|
||||
/// ASCII strings or contain a lot of ASCII strings (e. g. HTTP),
|
||||
/// it is convenient to print strings as ASCII when possible.
|
||||
///
|
||||
/// This struct wraps `&[u8]` just to override `fmt::Debug`.
|
||||
///
|
||||
/// `BsDebug` is not a part of public API of bytes crate.
|
||||
pub struct BsDebug<'a>(pub &'a [u8]);
|
||||
|
||||
impl<'a> fmt::Debug for BsDebug<'a> {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
try!(write!(fmt, "b\""));
|
||||
for &c in self.0 {
|
||||
// https://doc.rust-lang.org/reference.html#byte-escapes
|
||||
if c == b'\n' {
|
||||
try!(write!(fmt, "\\n"));
|
||||
} else if c == b'\r' {
|
||||
try!(write!(fmt, "\\r"));
|
||||
} else if c == b'\t' {
|
||||
try!(write!(fmt, "\\t"));
|
||||
} else if c == b'\\' || c == b'"' {
|
||||
try!(write!(fmt, "\\{}", c as char));
|
||||
} else if c == b'\0' {
|
||||
try!(write!(fmt, "\\0"));
|
||||
// ASCII printable except space
|
||||
} else if c > 0x20 && c < 0x7f {
|
||||
try!(write!(fmt, "{}", c as char));
|
||||
} else {
|
||||
try!(write!(fmt, "\\x{:02x}", c));
|
||||
}
|
||||
}
|
||||
try!(write!(fmt, "\""));
|
||||
Ok(())
|
||||
}
|
||||
}
|
100
third_party/rust/bytes/src/lib.rs
vendored
Normal file
100
third_party/rust/bytes/src/lib.rs
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
//! Provides abstractions for working with bytes.
|
||||
//!
|
||||
//! The `bytes` crate provides an efficient byte buffer structure
|
||||
//! ([`Bytes`](struct.Bytes.html)) and traits for working with buffer
|
||||
//! implementations ([`Buf`], [`BufMut`]).
|
||||
//!
|
||||
//! [`Buf`]: trait.Buf.html
|
||||
//! [`BufMut`]: trait.BufMut.html
|
||||
//!
|
||||
//! # `Bytes`
|
||||
//!
|
||||
//! `Bytes` is an efficient container for storing and operating on continguous
|
||||
//! slices of memory. It is intended for use primarily in networking code, but
|
||||
//! could have applications elsewhere as well.
|
||||
//!
|
||||
//! `Bytes` values facilitate zero-copy network programming by allowing multiple
|
||||
//! `Bytes` objects to point to the same underlying memory. This is managed by
|
||||
//! using a reference count to track when the memory is no longer needed and can
|
||||
//! be freed.
|
||||
//!
|
||||
//! A `Bytes` handle can be created directly from an existing byte store (such as &[u8]
|
||||
//! or Vec<u8>), but usually a `BytesMut` is used first and written to. For
|
||||
//! example:
|
||||
//!
|
||||
//! ```rust
|
||||
//! use bytes::{BytesMut, BufMut, BigEndian};
|
||||
//!
|
||||
//! let mut buf = BytesMut::with_capacity(1024);
|
||||
//! buf.put(&b"hello world"[..]);
|
||||
//! buf.put_u16::<BigEndian>(1234);
|
||||
//!
|
||||
//! let a = buf.take();
|
||||
//! assert_eq!(a, b"hello world\x04\xD2"[..]);
|
||||
//!
|
||||
//! buf.put(&b"goodbye world"[..]);
|
||||
//!
|
||||
//! let b = buf.take();
|
||||
//! assert_eq!(b, b"goodbye world"[..]);
|
||||
//!
|
||||
//! assert_eq!(buf.capacity(), 998);
|
||||
//! ```
|
||||
//!
|
||||
//! In the above example, only a single buffer of 1024 is allocated. The handles
|
||||
//! `a` and `b` will share the underlying buffer and maintain indices tracking
|
||||
//! the view into the buffer represented by the handle.
|
||||
//!
|
||||
//! See the [struct docs] for more details.
|
||||
//!
|
||||
//! [struct docs]: struct.Bytes.html
|
||||
//!
|
||||
//! # `Buf`, `BufMut`
|
||||
//!
|
||||
//! These two traits provide read and write access to buffers. The underlying
|
||||
//! storage may or may not be in contiguous memory. For example, `Bytes` is a
|
||||
//! buffer that guarantees contiguous memory, but a [rope] stores the bytes in
|
||||
//! disjoint chunks. `Buf` and `BufMut` maintain cursors tracking the current
|
||||
//! position in the underlying byte storage. When bytes are read or written, the
|
||||
//! cursor is advanced.
|
||||
//!
|
||||
//! [rope]: https://en.wikipedia.org/wiki/Rope_(data_structure)
|
||||
//!
|
||||
//! ## Relation with `Read` and `Write`
|
||||
//!
|
||||
//! At first glance, it may seem that `Buf` and `BufMut` overlap in
|
||||
//! functionality with `std::io::Read` and `std::io::Write`. However, they
|
||||
//! serve different purposes. A buffer is the value that is provided as an
|
||||
//! argument to `Read::read` and `Write::write`. `Read` and `Write` may then
|
||||
//! perform a syscall, which has the potential of failing. Operations on `Buf`
|
||||
//! and `BufMut` are infallible.
|
||||
|
||||
#![deny(warnings, missing_docs, missing_debug_implementations)]
|
||||
#![doc(html_root_url = "https://docs.rs/bytes/0.4")]
|
||||
|
||||
extern crate byteorder;
|
||||
extern crate iovec;
|
||||
|
||||
pub mod buf;
|
||||
pub use buf::{
|
||||
Buf,
|
||||
BufMut,
|
||||
IntoBuf,
|
||||
};
|
||||
#[deprecated(since = "0.4.1", note = "moved to `buf` module")]
|
||||
#[doc(hidden)]
|
||||
pub use buf::{
|
||||
Reader,
|
||||
Writer,
|
||||
Take,
|
||||
};
|
||||
|
||||
mod bytes;
|
||||
mod debug;
|
||||
pub use bytes::{Bytes, BytesMut};
|
||||
|
||||
pub use byteorder::{ByteOrder, BigEndian, LittleEndian};
|
||||
|
||||
// Optional Serde support
|
||||
#[cfg(feature = "serde")]
|
||||
#[doc(hidden)]
|
||||
pub mod serde;
|
82
third_party/rust/bytes/src/serde.rs
vendored
Normal file
82
third_party/rust/bytes/src/serde.rs
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
extern crate serde;
|
||||
|
||||
use std::{cmp, fmt};
|
||||
use self::serde::{Serialize, Serializer, Deserialize, Deserializer, de};
|
||||
use super::{Bytes, BytesMut};
|
||||
|
||||
macro_rules! serde_impl {
|
||||
($ty:ident, $visitor_ty:ident) => (
|
||||
impl Serialize for $ty {
|
||||
#[inline]
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where S: Serializer
|
||||
{
|
||||
serializer.serialize_bytes(&self)
|
||||
}
|
||||
}
|
||||
|
||||
struct $visitor_ty;
|
||||
|
||||
impl<'de> de::Visitor<'de> for $visitor_ty {
|
||||
type Value = $ty;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
formatter.write_str("byte array")
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn visit_seq<V>(self, mut seq: V) -> Result<Self::Value, V::Error>
|
||||
where V: de::SeqAccess<'de>
|
||||
{
|
||||
let len = cmp::min(seq.size_hint().unwrap_or(0), 4096);
|
||||
let mut values = Vec::with_capacity(len);
|
||||
|
||||
while let Some(value) = try!(seq.next_element()) {
|
||||
values.push(value);
|
||||
}
|
||||
|
||||
Ok(values.into())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn visit_bytes<E>(self, v: &[u8]) -> Result<Self::Value, E>
|
||||
where E: de::Error
|
||||
{
|
||||
Ok($ty::from(v))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<Self::Value, E>
|
||||
where E: de::Error
|
||||
{
|
||||
Ok($ty::from(v))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
|
||||
where E: de::Error
|
||||
{
|
||||
Ok($ty::from(v))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn visit_string<E>(self, v: String) -> Result<Self::Value, E>
|
||||
where E: de::Error
|
||||
{
|
||||
Ok($ty::from(v))
|
||||
}
|
||||
}
|
||||
|
||||
impl<'de> Deserialize<'de> for $ty {
|
||||
#[inline]
|
||||
fn deserialize<D>(deserializer: D) -> Result<$ty, D::Error>
|
||||
where D: Deserializer<'de>
|
||||
{
|
||||
deserializer.deserialize_byte_buf($visitor_ty)
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
serde_impl!(Bytes, BytesVisitor);
|
||||
serde_impl!(BytesMut, BytesMutVisitor);
|
53
third_party/rust/bytes/tests/test_buf.rs
vendored
Normal file
53
third_party/rust/bytes/tests/test_buf.rs
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
extern crate bytes;
|
||||
extern crate byteorder;
|
||||
extern crate iovec;
|
||||
|
||||
use bytes::Buf;
|
||||
use iovec::IoVec;
|
||||
use std::io::Cursor;
|
||||
|
||||
#[test]
|
||||
fn test_fresh_cursor_vec() {
|
||||
let mut buf = Cursor::new(b"hello".to_vec());
|
||||
|
||||
assert_eq!(buf.remaining(), 5);
|
||||
assert_eq!(buf.bytes(), b"hello");
|
||||
|
||||
buf.advance(2);
|
||||
|
||||
assert_eq!(buf.remaining(), 3);
|
||||
assert_eq!(buf.bytes(), b"llo");
|
||||
|
||||
buf.advance(3);
|
||||
|
||||
assert_eq!(buf.remaining(), 0);
|
||||
assert_eq!(buf.bytes(), b"");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_u8() {
|
||||
let mut buf = Cursor::new(b"\x21zomg");
|
||||
assert_eq!(0x21, buf.get_u8());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_u16() {
|
||||
let buf = b"\x21\x54zomg";
|
||||
assert_eq!(0x2154, Cursor::new(buf).get_u16::<byteorder::BigEndian>());
|
||||
assert_eq!(0x5421, Cursor::new(buf).get_u16::<byteorder::LittleEndian>());
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_get_u16_buffer_underflow() {
|
||||
let mut buf = Cursor::new(b"\x21");
|
||||
buf.get_u16::<byteorder::BigEndian>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bufs_vec() {
|
||||
let buf = Cursor::new(b"hello world");
|
||||
let mut dst: [&IoVec; 2] = Default::default();
|
||||
|
||||
assert_eq!(1, buf.bytes_vec(&mut dst[..]));
|
||||
}
|
83
third_party/rust/bytes/tests/test_buf_mut.rs
vendored
Normal file
83
third_party/rust/bytes/tests/test_buf_mut.rs
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
extern crate bytes;
|
||||
extern crate byteorder;
|
||||
extern crate iovec;
|
||||
|
||||
use bytes::{BufMut, BytesMut};
|
||||
use iovec::IoVec;
|
||||
use std::usize;
|
||||
use std::fmt::Write;
|
||||
|
||||
#[test]
|
||||
fn test_vec_as_mut_buf() {
|
||||
let mut buf = Vec::with_capacity(64);
|
||||
|
||||
assert_eq!(buf.remaining_mut(), usize::MAX);
|
||||
|
||||
unsafe {
|
||||
assert!(buf.bytes_mut().len() >= 64);
|
||||
}
|
||||
|
||||
buf.put(&b"zomg"[..]);
|
||||
|
||||
assert_eq!(&buf, b"zomg");
|
||||
|
||||
assert_eq!(buf.remaining_mut(), usize::MAX - 4);
|
||||
assert_eq!(buf.capacity(), 64);
|
||||
|
||||
for _ in 0..16 {
|
||||
buf.put(&b"zomg"[..]);
|
||||
}
|
||||
|
||||
assert_eq!(buf.len(), 68);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_put_u8() {
|
||||
let mut buf = Vec::with_capacity(8);
|
||||
buf.put::<u8>(33);
|
||||
assert_eq!(b"\x21", &buf[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_put_u16() {
|
||||
let mut buf = Vec::with_capacity(8);
|
||||
buf.put_u16::<byteorder::BigEndian>(8532);
|
||||
assert_eq!(b"\x21\x54", &buf[..]);
|
||||
|
||||
buf.clear();
|
||||
buf.put_u16::<byteorder::LittleEndian>(8532);
|
||||
assert_eq!(b"\x54\x21", &buf[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_vec_advance_mut() {
|
||||
// Regression test for carllerche/bytes#108.
|
||||
let mut buf = Vec::with_capacity(8);
|
||||
unsafe {
|
||||
buf.advance_mut(12);
|
||||
assert_eq!(buf.len(), 12);
|
||||
assert!(buf.capacity() >= 12, "capacity: {}", buf.capacity());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_clone() {
|
||||
let mut buf = BytesMut::with_capacity(100);
|
||||
buf.write_str("this is a test").unwrap();
|
||||
let buf2 = buf.clone();
|
||||
|
||||
buf.write_str(" of our emergecy broadcast system").unwrap();
|
||||
assert!(buf != buf2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bufs_vec_mut() {
|
||||
use std::mem;
|
||||
|
||||
let mut buf = BytesMut::from(&b"hello world"[..]);
|
||||
|
||||
unsafe {
|
||||
let mut dst: [&mut IoVec; 2] = mem::zeroed();
|
||||
assert_eq!(1, buf.bytes_vec_mut(&mut dst[..]));
|
||||
}
|
||||
}
|
516
third_party/rust/bytes/tests/test_bytes.rs
vendored
Normal file
516
third_party/rust/bytes/tests/test_bytes.rs
vendored
Normal file
@ -0,0 +1,516 @@
|
||||
extern crate bytes;
|
||||
|
||||
use bytes::{Bytes, BytesMut, BufMut};
|
||||
|
||||
const LONG: &'static [u8] = b"mary had a little lamb, little lamb, little lamb";
|
||||
const SHORT: &'static [u8] = b"hello world";
|
||||
|
||||
fn inline_cap() -> usize {
|
||||
use std::mem;
|
||||
4 * mem::size_of::<usize>() - 1
|
||||
}
|
||||
|
||||
fn is_sync<T: Sync>() {}
|
||||
fn is_send<T: Send>() {}
|
||||
|
||||
#[test]
|
||||
fn test_bounds() {
|
||||
is_sync::<Bytes>();
|
||||
is_sync::<BytesMut>();
|
||||
is_send::<Bytes>();
|
||||
is_send::<BytesMut>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn from_slice() {
|
||||
let a = Bytes::from(&b"abcdefgh"[..]);
|
||||
assert_eq!(a, b"abcdefgh"[..]);
|
||||
assert_eq!(a, &b"abcdefgh"[..]);
|
||||
assert_eq!(a, Vec::from(&b"abcdefgh"[..]));
|
||||
assert_eq!(b"abcdefgh"[..], a);
|
||||
assert_eq!(&b"abcdefgh"[..], a);
|
||||
assert_eq!(Vec::from(&b"abcdefgh"[..]), a);
|
||||
|
||||
let a = BytesMut::from(&b"abcdefgh"[..]);
|
||||
assert_eq!(a, b"abcdefgh"[..]);
|
||||
assert_eq!(a, &b"abcdefgh"[..]);
|
||||
assert_eq!(a, Vec::from(&b"abcdefgh"[..]));
|
||||
assert_eq!(b"abcdefgh"[..], a);
|
||||
assert_eq!(&b"abcdefgh"[..], a);
|
||||
assert_eq!(Vec::from(&b"abcdefgh"[..]), a);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fmt() {
|
||||
let a = format!("{:?}", Bytes::from(&b"abcdefg"[..]));
|
||||
let b = "b\"abcdefg\"";
|
||||
|
||||
assert_eq!(a, b);
|
||||
|
||||
let a = format!("{:?}", BytesMut::from(&b"abcdefg"[..]));
|
||||
assert_eq!(a, b);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fmt_write() {
|
||||
use std::fmt::Write;
|
||||
use std::iter::FromIterator;
|
||||
let s = String::from_iter((0..10).map(|_| "abcdefg"));
|
||||
|
||||
let mut a = BytesMut::with_capacity(64);
|
||||
write!(a, "{}", &s[..64]).unwrap();
|
||||
assert_eq!(a, s[..64].as_bytes());
|
||||
|
||||
|
||||
let mut b = BytesMut::with_capacity(64);
|
||||
write!(b, "{}", &s[..32]).unwrap();
|
||||
write!(b, "{}", &s[32..64]).unwrap();
|
||||
assert_eq!(b, s[..64].as_bytes());
|
||||
|
||||
|
||||
let mut c = BytesMut::with_capacity(64);
|
||||
write!(c, "{}", s).unwrap_err();
|
||||
assert!(c.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn len() {
|
||||
let a = Bytes::from(&b"abcdefg"[..]);
|
||||
assert_eq!(a.len(), 7);
|
||||
|
||||
let a = BytesMut::from(&b"abcdefg"[..]);
|
||||
assert_eq!(a.len(), 7);
|
||||
|
||||
let a = Bytes::from(&b""[..]);
|
||||
assert!(a.is_empty());
|
||||
|
||||
let a = BytesMut::from(&b""[..]);
|
||||
assert!(a.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn index() {
|
||||
let a = Bytes::from(&b"hello world"[..]);
|
||||
assert_eq!(a[0..5], *b"hello");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn slice() {
|
||||
let a = Bytes::from(&b"hello world"[..]);
|
||||
|
||||
let b = a.slice(3, 5);
|
||||
assert_eq!(b, b"lo"[..]);
|
||||
|
||||
let b = a.slice(0, 0);
|
||||
assert_eq!(b, b""[..]);
|
||||
|
||||
let b = a.slice(3, 3);
|
||||
assert_eq!(b, b""[..]);
|
||||
|
||||
let b = a.slice(a.len(), a.len());
|
||||
assert_eq!(b, b""[..]);
|
||||
|
||||
let b = a.slice_to(5);
|
||||
assert_eq!(b, b"hello"[..]);
|
||||
|
||||
let b = a.slice_from(3);
|
||||
assert_eq!(b, b"lo world"[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn slice_oob_1() {
|
||||
let a = Bytes::from(&b"hello world"[..]);
|
||||
a.slice(5, inline_cap() + 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn slice_oob_2() {
|
||||
let a = Bytes::from(&b"hello world"[..]);
|
||||
a.slice(inline_cap() + 1, inline_cap() + 5);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn split_off() {
|
||||
let mut hello = Bytes::from(&b"helloworld"[..]);
|
||||
let world = hello.split_off(5);
|
||||
|
||||
assert_eq!(hello, &b"hello"[..]);
|
||||
assert_eq!(world, &b"world"[..]);
|
||||
|
||||
let mut hello = BytesMut::from(&b"helloworld"[..]);
|
||||
let world = hello.split_off(5);
|
||||
|
||||
assert_eq!(hello, &b"hello"[..]);
|
||||
assert_eq!(world, &b"world"[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn split_off_oob() {
|
||||
let mut hello = Bytes::from(&b"helloworld"[..]);
|
||||
hello.split_off(inline_cap() + 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn split_off_uninitialized() {
|
||||
let mut bytes = BytesMut::with_capacity(1024);
|
||||
let other = bytes.split_off(128);
|
||||
|
||||
assert_eq!(bytes.len(), 0);
|
||||
assert_eq!(bytes.capacity(), 128);
|
||||
|
||||
assert_eq!(other.len(), 0);
|
||||
assert_eq!(other.capacity(), 896);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn split_off_to_loop() {
|
||||
let s = b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
for i in 0..(s.len() + 1) {
|
||||
{
|
||||
let mut bytes = Bytes::from(&s[..]);
|
||||
let off = bytes.split_off(i);
|
||||
assert_eq!(i, bytes.len());
|
||||
let mut sum = Vec::new();
|
||||
sum.extend(&bytes);
|
||||
sum.extend(&off);
|
||||
assert_eq!(&s[..], &sum[..]);
|
||||
}
|
||||
{
|
||||
let mut bytes = BytesMut::from(&s[..]);
|
||||
let off = bytes.split_off(i);
|
||||
assert_eq!(i, bytes.len());
|
||||
let mut sum = Vec::new();
|
||||
sum.extend(&bytes);
|
||||
sum.extend(&off);
|
||||
assert_eq!(&s[..], &sum[..]);
|
||||
}
|
||||
{
|
||||
let mut bytes = Bytes::from(&s[..]);
|
||||
let off = bytes.split_to(i);
|
||||
assert_eq!(i, off.len());
|
||||
let mut sum = Vec::new();
|
||||
sum.extend(&off);
|
||||
sum.extend(&bytes);
|
||||
assert_eq!(&s[..], &sum[..]);
|
||||
}
|
||||
{
|
||||
let mut bytes = BytesMut::from(&s[..]);
|
||||
let off = bytes.split_to(i);
|
||||
assert_eq!(i, off.len());
|
||||
let mut sum = Vec::new();
|
||||
sum.extend(&off);
|
||||
sum.extend(&bytes);
|
||||
assert_eq!(&s[..], &sum[..]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn split_to_1() {
|
||||
// Inline
|
||||
let mut a = Bytes::from(SHORT);
|
||||
let b = a.split_to(4);
|
||||
|
||||
assert_eq!(SHORT[4..], a);
|
||||
assert_eq!(SHORT[..4], b);
|
||||
|
||||
// Allocated
|
||||
let mut a = Bytes::from(LONG);
|
||||
let b = a.split_to(4);
|
||||
|
||||
assert_eq!(LONG[4..], a);
|
||||
assert_eq!(LONG[..4], b);
|
||||
|
||||
let mut a = Bytes::from(LONG);
|
||||
let b = a.split_to(30);
|
||||
|
||||
assert_eq!(LONG[30..], a);
|
||||
assert_eq!(LONG[..30], b);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn split_to_2() {
|
||||
let mut a = Bytes::from(LONG);
|
||||
assert_eq!(LONG, a);
|
||||
|
||||
let b = a.split_to(1);
|
||||
|
||||
assert_eq!(LONG[1..], a);
|
||||
drop(b);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn split_to_oob() {
|
||||
let mut hello = Bytes::from(&b"helloworld"[..]);
|
||||
hello.split_to(inline_cap() + 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn split_to_oob_mut() {
|
||||
let mut hello = BytesMut::from(&b"helloworld"[..]);
|
||||
hello.split_to(inline_cap() + 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn split_to_uninitialized() {
|
||||
let mut bytes = BytesMut::with_capacity(1024);
|
||||
let other = bytes.split_to(128);
|
||||
|
||||
assert_eq!(bytes.len(), 0);
|
||||
assert_eq!(bytes.capacity(), 896);
|
||||
|
||||
assert_eq!(other.len(), 0);
|
||||
assert_eq!(other.capacity(), 128);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn split_off_to_at_gt_len() {
|
||||
fn make_bytes() -> Bytes {
|
||||
let mut bytes = BytesMut::with_capacity(100);
|
||||
bytes.put_slice(&[10, 20, 30, 40]);
|
||||
bytes.freeze()
|
||||
}
|
||||
|
||||
use std::panic;
|
||||
|
||||
make_bytes().split_to(4);
|
||||
make_bytes().split_off(4);
|
||||
|
||||
assert!(panic::catch_unwind(move || {
|
||||
make_bytes().split_to(5);
|
||||
}).is_err());
|
||||
|
||||
assert!(panic::catch_unwind(move || {
|
||||
make_bytes().split_off(5);
|
||||
}).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fns_defined_for_bytes_mut() {
|
||||
let mut bytes = BytesMut::from(&b"hello world"[..]);
|
||||
|
||||
bytes.as_ptr();
|
||||
bytes.as_mut_ptr();
|
||||
|
||||
// Iterator
|
||||
let v: Vec<u8> = bytes.iter().map(|b| *b).collect();
|
||||
assert_eq!(&v[..], bytes);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reserve_convert() {
|
||||
// Inline -> Vec
|
||||
let mut bytes = BytesMut::with_capacity(8);
|
||||
bytes.put("hello");
|
||||
bytes.reserve(40);
|
||||
assert_eq!(bytes.capacity(), 45);
|
||||
assert_eq!(bytes, "hello");
|
||||
|
||||
// Inline -> Inline
|
||||
let mut bytes = BytesMut::with_capacity(inline_cap());
|
||||
bytes.put("abcdefghijkl");
|
||||
|
||||
let a = bytes.split_to(10);
|
||||
bytes.reserve(inline_cap() - 3);
|
||||
assert_eq!(inline_cap(), bytes.capacity());
|
||||
|
||||
assert_eq!(bytes, "kl");
|
||||
assert_eq!(a, "abcdefghij");
|
||||
|
||||
// Vec -> Vec
|
||||
let mut bytes = BytesMut::from(LONG);
|
||||
bytes.reserve(64);
|
||||
assert_eq!(bytes.capacity(), LONG.len() + 64);
|
||||
|
||||
// Arc -> Vec
|
||||
let mut bytes = BytesMut::from(LONG);
|
||||
let a = bytes.split_to(30);
|
||||
|
||||
bytes.reserve(128);
|
||||
assert!(bytes.capacity() >= bytes.len() + 128);
|
||||
|
||||
drop(a);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reserve_growth() {
|
||||
let mut bytes = BytesMut::with_capacity(64);
|
||||
bytes.put("hello world");
|
||||
let _ = bytes.take();
|
||||
|
||||
bytes.reserve(65);
|
||||
assert_eq!(bytes.capacity(), 128);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reserve_allocates_at_least_original_capacity() {
|
||||
let mut bytes = BytesMut::with_capacity(128);
|
||||
|
||||
for i in 0..120 {
|
||||
bytes.put(i as u8);
|
||||
}
|
||||
|
||||
let _other = bytes.take();
|
||||
|
||||
bytes.reserve(16);
|
||||
assert_eq!(bytes.capacity(), 128);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reserve_max_original_capacity_value() {
|
||||
const SIZE: usize = 128 * 1024;
|
||||
|
||||
let mut bytes = BytesMut::with_capacity(SIZE);
|
||||
|
||||
for _ in 0..SIZE {
|
||||
bytes.put(0u8);
|
||||
}
|
||||
|
||||
let _other = bytes.take();
|
||||
|
||||
bytes.reserve(16);
|
||||
assert_eq!(bytes.capacity(), 64 * 1024);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reserve_in_arc_unique_does_not_overallocate() {
|
||||
let mut bytes = BytesMut::with_capacity(1000);
|
||||
bytes.take();
|
||||
|
||||
// now bytes is Arc and refcount == 1
|
||||
|
||||
assert_eq!(1000, bytes.capacity());
|
||||
bytes.reserve(2001);
|
||||
assert_eq!(2001, bytes.capacity());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reserve_in_arc_unique_doubles() {
|
||||
let mut bytes = BytesMut::with_capacity(1000);
|
||||
bytes.take();
|
||||
|
||||
// now bytes is Arc and refcount == 1
|
||||
|
||||
assert_eq!(1000, bytes.capacity());
|
||||
bytes.reserve(1001);
|
||||
assert_eq!(2000, bytes.capacity());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reserve_in_arc_nonunique_does_not_overallocate() {
|
||||
let mut bytes = BytesMut::with_capacity(1000);
|
||||
let _copy = bytes.take();
|
||||
|
||||
// now bytes is Arc and refcount == 2
|
||||
|
||||
assert_eq!(1000, bytes.capacity());
|
||||
bytes.reserve(2001);
|
||||
assert_eq!(2001, bytes.capacity());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn inline_storage() {
|
||||
let mut bytes = BytesMut::with_capacity(inline_cap());
|
||||
let zero = [0u8; 64];
|
||||
|
||||
bytes.put(&zero[0..inline_cap()]);
|
||||
assert_eq!(*bytes, zero[0..inline_cap()]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn extend_mut() {
|
||||
let mut bytes = BytesMut::with_capacity(0);
|
||||
bytes.extend(LONG);
|
||||
assert_eq!(*bytes, LONG[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn extend_shr() {
|
||||
let mut bytes = Bytes::new();
|
||||
bytes.extend(LONG);
|
||||
assert_eq!(*bytes, LONG[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn extend_from_slice_mut() {
|
||||
for &i in &[3, 34] {
|
||||
let mut bytes = BytesMut::new();
|
||||
bytes.extend_from_slice(&LONG[..i]);
|
||||
bytes.extend_from_slice(&LONG[i..]);
|
||||
assert_eq!(LONG[..], *bytes);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn extend_from_slice_shr() {
|
||||
for &i in &[3, 34] {
|
||||
let mut bytes = Bytes::new();
|
||||
bytes.extend_from_slice(&LONG[..i]);
|
||||
bytes.extend_from_slice(&LONG[i..]);
|
||||
assert_eq!(LONG[..], *bytes);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn from_static() {
|
||||
let mut a = Bytes::from_static(b"ab");
|
||||
let b = a.split_off(1);
|
||||
|
||||
assert_eq!(a, b"a"[..]);
|
||||
assert_eq!(b, b"b"[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
// Only run these tests on little endian systems. CI uses qemu for testing
|
||||
// little endian... and qemu doesn't really support threading all that well.
|
||||
#[cfg(target_endian = "little")]
|
||||
fn stress() {
|
||||
// Tests promoting a buffer from a vec -> shared in a concurrent situation
|
||||
use std::sync::{Arc, Barrier};
|
||||
use std::thread;
|
||||
|
||||
const THREADS: usize = 8;
|
||||
const ITERS: usize = 1_000;
|
||||
|
||||
for i in 0..ITERS {
|
||||
let data = [i as u8; 256];
|
||||
let buf = Arc::new(Bytes::from(&data[..]));
|
||||
|
||||
let barrier = Arc::new(Barrier::new(THREADS));
|
||||
let mut joins = Vec::with_capacity(THREADS);
|
||||
|
||||
for _ in 0..THREADS {
|
||||
let c = barrier.clone();
|
||||
let buf = buf.clone();
|
||||
|
||||
joins.push(thread::spawn(move || {
|
||||
c.wait();
|
||||
let buf: Bytes = (*buf).clone();
|
||||
drop(buf);
|
||||
}));
|
||||
}
|
||||
|
||||
for th in joins {
|
||||
th.join().unwrap();
|
||||
}
|
||||
|
||||
assert_eq!(*buf, data[..]);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn partial_eq_bytesmut() {
|
||||
let bytes = Bytes::from(&b"The quick red fox"[..]);
|
||||
let bytesmut = BytesMut::from(&b"The quick red fox"[..]);
|
||||
assert!(bytes == bytesmut);
|
||||
assert!(bytesmut == bytes);
|
||||
let bytes2 = Bytes::from(&b"Jumped over the lazy brown dog"[..]);
|
||||
assert!(bytes2 != bytesmut);
|
||||
assert!(bytesmut != bytes2);
|
||||
}
|
102
third_party/rust/bytes/tests/test_chain.rs
vendored
Normal file
102
third_party/rust/bytes/tests/test_chain.rs
vendored
Normal file
@ -0,0 +1,102 @@
|
||||
extern crate bytes;
|
||||
extern crate iovec;
|
||||
|
||||
use bytes::{Buf, BufMut, Bytes, BytesMut};
|
||||
use bytes::buf::Chain;
|
||||
use iovec::IoVec;
|
||||
use std::io::Cursor;
|
||||
|
||||
#[test]
|
||||
fn collect_two_bufs() {
|
||||
let a = Cursor::new(Bytes::from(&b"hello"[..]));
|
||||
let b = Cursor::new(Bytes::from(&b"world"[..]));
|
||||
|
||||
let res: Vec<u8> = a.chain(b).collect();
|
||||
assert_eq!(res, &b"helloworld"[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn writing_chained() {
|
||||
let mut a = BytesMut::with_capacity(64);
|
||||
let mut b = BytesMut::with_capacity(64);
|
||||
|
||||
{
|
||||
let mut buf = Chain::new(&mut a, &mut b);
|
||||
|
||||
for i in 0..128 {
|
||||
buf.put(i as u8);
|
||||
}
|
||||
}
|
||||
|
||||
assert_eq!(64, a.len());
|
||||
assert_eq!(64, b.len());
|
||||
|
||||
for i in 0..64 {
|
||||
let expect = i as u8;
|
||||
assert_eq!(expect, a[i]);
|
||||
assert_eq!(expect + 64, b[i]);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn iterating_two_bufs() {
|
||||
let a = Cursor::new(Bytes::from(&b"hello"[..]));
|
||||
let b = Cursor::new(Bytes::from(&b"world"[..]));
|
||||
|
||||
let res: Vec<u8> = a.chain(b).iter().collect();
|
||||
assert_eq!(res, &b"helloworld"[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn vectored_read() {
|
||||
let a = Cursor::new(Bytes::from(&b"hello"[..]));
|
||||
let b = Cursor::new(Bytes::from(&b"world"[..]));
|
||||
|
||||
let mut buf = a.chain(b);
|
||||
|
||||
{
|
||||
let mut iovecs: [&IoVec; 4] = Default::default();
|
||||
|
||||
assert_eq!(2, buf.bytes_vec(&mut iovecs));
|
||||
assert_eq!(iovecs[0][..], b"hello"[..]);
|
||||
assert_eq!(iovecs[1][..], b"world"[..]);
|
||||
assert!(iovecs[2].is_empty());
|
||||
assert!(iovecs[3].is_empty());
|
||||
}
|
||||
|
||||
buf.advance(2);
|
||||
|
||||
{
|
||||
let mut iovecs: [&IoVec; 4] = Default::default();
|
||||
|
||||
assert_eq!(2, buf.bytes_vec(&mut iovecs));
|
||||
assert_eq!(iovecs[0][..], b"llo"[..]);
|
||||
assert_eq!(iovecs[1][..], b"world"[..]);
|
||||
assert!(iovecs[2].is_empty());
|
||||
assert!(iovecs[3].is_empty());
|
||||
}
|
||||
|
||||
buf.advance(3);
|
||||
|
||||
{
|
||||
let mut iovecs: [&IoVec; 4] = Default::default();
|
||||
|
||||
assert_eq!(1, buf.bytes_vec(&mut iovecs));
|
||||
assert_eq!(iovecs[0][..], b"world"[..]);
|
||||
assert!(iovecs[1].is_empty());
|
||||
assert!(iovecs[2].is_empty());
|
||||
assert!(iovecs[3].is_empty());
|
||||
}
|
||||
|
||||
buf.advance(3);
|
||||
|
||||
{
|
||||
let mut iovecs: [&IoVec; 4] = Default::default();
|
||||
|
||||
assert_eq!(1, buf.bytes_vec(&mut iovecs));
|
||||
assert_eq!(iovecs[0][..], b"ld"[..]);
|
||||
assert!(iovecs[1].is_empty());
|
||||
assert!(iovecs[2].is_empty());
|
||||
assert!(iovecs[3].is_empty());
|
||||
}
|
||||
}
|
35
third_party/rust/bytes/tests/test_debug.rs
vendored
Normal file
35
third_party/rust/bytes/tests/test_debug.rs
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
extern crate bytes;
|
||||
|
||||
use bytes::Bytes;
|
||||
|
||||
#[test]
|
||||
fn fmt() {
|
||||
let vec: Vec<_> = (0..0x100).map(|b| b as u8).collect();
|
||||
|
||||
let expected = "b\"\
|
||||
\\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07\
|
||||
\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\
|
||||
\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\
|
||||
\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f\
|
||||
\\x20!\\\"#$%&'()*+,-./0123456789:;<=>?\
|
||||
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_\
|
||||
`abcdefghijklmnopqrstuvwxyz{|}~\\x7f\
|
||||
\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\
|
||||
\\x88\\x89\\x8a\\x8b\\x8c\\x8d\\x8e\\x8f\
|
||||
\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\
|
||||
\\x98\\x99\\x9a\\x9b\\x9c\\x9d\\x9e\\x9f\
|
||||
\\xa0\\xa1\\xa2\\xa3\\xa4\\xa5\\xa6\\xa7\
|
||||
\\xa8\\xa9\\xaa\\xab\\xac\\xad\\xae\\xaf\
|
||||
\\xb0\\xb1\\xb2\\xb3\\xb4\\xb5\\xb6\\xb7\
|
||||
\\xb8\\xb9\\xba\\xbb\\xbc\\xbd\\xbe\\xbf\
|
||||
\\xc0\\xc1\\xc2\\xc3\\xc4\\xc5\\xc6\\xc7\
|
||||
\\xc8\\xc9\\xca\\xcb\\xcc\\xcd\\xce\\xcf\
|
||||
\\xd0\\xd1\\xd2\\xd3\\xd4\\xd5\\xd6\\xd7\
|
||||
\\xd8\\xd9\\xda\\xdb\\xdc\\xdd\\xde\\xdf\
|
||||
\\xe0\\xe1\\xe2\\xe3\\xe4\\xe5\\xe6\\xe7\
|
||||
\\xe8\\xe9\\xea\\xeb\\xec\\xed\\xee\\xef\
|
||||
\\xf0\\xf1\\xf2\\xf3\\xf4\\xf5\\xf6\\xf7\
|
||||
\\xf8\\xf9\\xfa\\xfb\\xfc\\xfd\\xfe\\xff\"";
|
||||
|
||||
assert_eq!(expected, format!("{:?}", Bytes::from(vec)));
|
||||
}
|
34
third_party/rust/bytes/tests/test_from_buf.rs
vendored
Normal file
34
third_party/rust/bytes/tests/test_from_buf.rs
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
extern crate bytes;
|
||||
|
||||
use bytes::{Buf, Bytes, BytesMut};
|
||||
use std::io::Cursor;
|
||||
|
||||
const LONG: &'static [u8] = b"mary had a little lamb, little lamb, little lamb";
|
||||
const SHORT: &'static [u8] = b"hello world";
|
||||
|
||||
#[test]
|
||||
fn collect_to_vec() {
|
||||
let buf: Vec<u8> = Cursor::new(SHORT).collect();
|
||||
assert_eq!(buf, SHORT);
|
||||
|
||||
let buf: Vec<u8> = Cursor::new(LONG).collect();
|
||||
assert_eq!(buf, LONG);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn collect_to_bytes() {
|
||||
let buf: Bytes = Cursor::new(SHORT).collect();
|
||||
assert_eq!(buf, SHORT);
|
||||
|
||||
let buf: Bytes = Cursor::new(LONG).collect();
|
||||
assert_eq!(buf, LONG);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn collect_to_bytes_mut() {
|
||||
let buf: BytesMut = Cursor::new(SHORT).collect();
|
||||
assert_eq!(buf, SHORT);
|
||||
|
||||
let buf: BytesMut = Cursor::new(LONG).collect();
|
||||
assert_eq!(buf, LONG);
|
||||
}
|
22
third_party/rust/bytes/tests/test_iter.rs
vendored
Normal file
22
third_party/rust/bytes/tests/test_iter.rs
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
extern crate bytes;
|
||||
|
||||
use bytes::{Buf, IntoBuf, Bytes};
|
||||
|
||||
#[test]
|
||||
fn iter_len() {
|
||||
let buf = Bytes::from(&b"hello world"[..]).into_buf();
|
||||
let iter = buf.iter();
|
||||
|
||||
assert_eq!(iter.size_hint(), (11, Some(11)));
|
||||
assert_eq!(iter.len(), 11);
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn empty_iter_len() {
|
||||
let buf = Bytes::from(&b""[..]).into_buf();
|
||||
let iter = buf.iter();
|
||||
|
||||
assert_eq!(iter.size_hint(), (0, Some(0)));
|
||||
assert_eq!(iter.len(), 0);
|
||||
}
|
21
third_party/rust/bytes/tests/test_serde.rs
vendored
Normal file
21
third_party/rust/bytes/tests/test_serde.rs
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
#![cfg(feature = "serde")]
|
||||
|
||||
extern crate bytes;
|
||||
extern crate serde_test;
|
||||
use serde_test::{Token, assert_tokens};
|
||||
|
||||
#[test]
|
||||
fn test_ser_de_empty() {
|
||||
let b = bytes::Bytes::new();
|
||||
assert_tokens(&b, &[Token::Bytes(b"")]);
|
||||
let b = bytes::BytesMut::with_capacity(0);
|
||||
assert_tokens(&b, &[Token::Bytes(b"")]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ser_de() {
|
||||
let b = bytes::Bytes::from(&b"bytes"[..]);
|
||||
assert_tokens(&b, &[Token::Bytes(b"bytes")]);
|
||||
let b = bytes::BytesMut::from(&b"bytes"[..]);
|
||||
assert_tokens(&b, &[Token::Bytes(b"bytes")]);
|
||||
}
|
13
third_party/rust/bytes/tests/test_take.rs
vendored
Normal file
13
third_party/rust/bytes/tests/test_take.rs
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
extern crate bytes;
|
||||
|
||||
use bytes::Buf;
|
||||
use std::io::Cursor;
|
||||
|
||||
#[test]
|
||||
fn long_take() {
|
||||
// Tests that take with a size greater than the buffer length will not
|
||||
// overrun the buffer. Regression test for #138.
|
||||
let buf = Cursor::new(b"hello world").take(100);
|
||||
assert_eq!(11, buf.remaining());
|
||||
assert_eq!(b"hello world", buf.bytes());
|
||||
}
|
File diff suppressed because one or more lines are too long
0
third_party/rust/bzip2-sys/.cargo-ok
vendored
0
third_party/rust/bzip2-sys/.cargo-ok
vendored
2
third_party/rust/bzip2/.cargo-checksum.json
vendored
2
third_party/rust/bzip2/.cargo-checksum.json
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"364c4f937827f2198a09375da4e600e9125226aa48a8d638ae6e60ac81a4138d","Cargo.toml":"03be4e0cd554c624cc0440aa16c76de36cf70504031ec72774579aa4a4f66820","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"6fc30c321b044d0df0881d88f6692d5a033ebc2c85a9854013b268e0d41bf736","appveyor.yml":"a39fd7664bf538147bfb494b9f9c96d6f898d9896a5d5e1806019f399cc44bff","src/bufread.rs":"2d4dc93a26131cd483ecdfa862f559c187ea3afc6252bf7ab120b69f5aa58a96","src/lib.rs":"e37f771f5036116b3fd5911f9195b769c481f002b81a6c6c7588e07227bc7c0d","src/mem.rs":"e01c78d4ccc8fa62e62b807d18d68b359826f341e18b22347be8ae37b787ca18","src/read.rs":"c7cd2002c4b5210f67febb01e70dd5333f155a2786d2dc7e0bb8c2b6603e7ba2","src/write.rs":"b1bdedf64fe1a011468d882f45b6ee83d1e52a4d9b2c4898284f8aa09cf1b1d7","tests/tokio.rs":"b148e0909a10636ead355bf8cd1a5b9cdd9b1ad5f0ab4fbf5c20c49c03cd0975"},"package":"c3eafc42c44e0d827de6b1c131175098fe7fb53b8ce8a47e65cb3ea94688be24"}
|
||||
{"files":{".travis.yml":"364c4f937827f2198a09375da4e600e9125226aa48a8d638ae6e60ac81a4138d","Cargo.toml":"03be4e0cd554c624cc0440aa16c76de36cf70504031ec72774579aa4a4f66820","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"6fc30c321b044d0df0881d88f6692d5a033ebc2c85a9854013b268e0d41bf736","appveyor.yml":"a39fd7664bf538147bfb494b9f9c96d6f898d9896a5d5e1806019f399cc44bff","src/bufread.rs":"2d4dc93a26131cd483ecdfa862f559c187ea3afc6252bf7ab120b69f5aa58a96","src/lib.rs":"e37f771f5036116b3fd5911f9195b769c481f002b81a6c6c7588e07227bc7c0d","src/mem.rs":"e01c78d4ccc8fa62e62b807d18d68b359826f341e18b22347be8ae37b787ca18","src/read.rs":"c7cd2002c4b5210f67febb01e70dd5333f155a2786d2dc7e0bb8c2b6603e7ba2","src/write.rs":"b1bdedf64fe1a011468d882f45b6ee83d1e52a4d9b2c4898284f8aa09cf1b1d7","tests/tokio.rs":"b148e0909a10636ead355bf8cd1a5b9cdd9b1ad5f0ab4fbf5c20c49c03cd0975"},"package":"c3eafc42c44e0d827de6b1c131175098fe7fb53b8ce8a47e65cb3ea94688be24"}
|
0
third_party/rust/bzip2/.cargo-ok
vendored
0
third_party/rust/bzip2/.cargo-ok
vendored
2
third_party/rust/cexpr/.cargo-checksum.json
vendored
2
third_party/rust/cexpr/.cargo-checksum.json
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"fb51f35c4be7c1a6768ab026c11092cbf8b81aebaaa970e19f0b0033f7a26b88","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"d9771b8c6cf4426d3846de54c1febe20907f1eeadf7adfb5ade89a83bd9ea77f","src/expr.rs":"dc3e299b02b33e1441d6e82482409272554cfae8f271e3b5664a216ecf1fecdc","src/lib.rs":"a37cca356d761557bd27e08ce46044b758bd21d523d039105e71597f64da9ba1","src/literal.rs":"deddad795a6788a78533f49b6afa784702e2dbfd9848d6fad60ec5cecabfb840","src/token.rs":"85d63f778a438ba9f39dac643473d457103bad2f2d4b53dd62e65ded65b1a83d","tests/clang.rs":"125058defb8166679019475d72a76804ac2dbfc09f50c3fad5b908970d652f02","tests/input/chars.h":"69c8141870872b795b5174bad125b748732c2b01d0e98ffcfc37b19f3f791f69","tests/input/fail.h":"b0b6cffd2dd17410b5eb02ee79ab75754820480b960db8a9866cc9983bd36b65","tests/input/floats.h":"28ec664e793c494e1a31f3bc5b790014e9921fc741bf475a86319b9a9eee5915","tests/input/int_signed.h":"934199eded85dd7820ca08c0beb1381ee6d9339970d2720a69c23025571707ce","tests/input/int_unsigned.h":"3cdf9782a6e74796833ea0dfcb35b6ab6ca76a89080e82ed39bac0d55064d88c","tests/input/strings.h":"27de768b506a1aedfdb750ac53b7a395cc20395958ff3263af1ab5851e2c412c"},"package":"393a5f0088efbe41f9d1fcd062f24e83c278608420e62109feb2c8abee07de7d"}
|
||||
{"files":{"Cargo.toml":"fb51f35c4be7c1a6768ab026c11092cbf8b81aebaaa970e19f0b0033f7a26b88","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"d9771b8c6cf4426d3846de54c1febe20907f1eeadf7adfb5ade89a83bd9ea77f","src/expr.rs":"dc3e299b02b33e1441d6e82482409272554cfae8f271e3b5664a216ecf1fecdc","src/lib.rs":"a37cca356d761557bd27e08ce46044b758bd21d523d039105e71597f64da9ba1","src/literal.rs":"deddad795a6788a78533f49b6afa784702e2dbfd9848d6fad60ec5cecabfb840","src/token.rs":"85d63f778a438ba9f39dac643473d457103bad2f2d4b53dd62e65ded65b1a83d","tests/clang.rs":"125058defb8166679019475d72a76804ac2dbfc09f50c3fad5b908970d652f02","tests/input/chars.h":"69c8141870872b795b5174bad125b748732c2b01d0e98ffcfc37b19f3f791f69","tests/input/fail.h":"b0b6cffd2dd17410b5eb02ee79ab75754820480b960db8a9866cc9983bd36b65","tests/input/floats.h":"28ec664e793c494e1a31f3bc5b790014e9921fc741bf475a86319b9a9eee5915","tests/input/int_signed.h":"934199eded85dd7820ca08c0beb1381ee6d9339970d2720a69c23025571707ce","tests/input/int_unsigned.h":"3cdf9782a6e74796833ea0dfcb35b6ab6ca76a89080e82ed39bac0d55064d88c","tests/input/strings.h":"27de768b506a1aedfdb750ac53b7a395cc20395958ff3263af1ab5851e2c412c"},"package":"393a5f0088efbe41f9d1fcd062f24e83c278608420e62109feb2c8abee07de7d"}
|
0
third_party/rust/cexpr/.cargo-ok
vendored
0
third_party/rust/cexpr/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"e4a302e9494e53483326b0307a2969e73fa7f3930199ad8b7be1015ee1827e03","Cargo.toml":"85c3d6ec135ebe7ba9681d76b08b4fb9ef16e70ad05fbbc5df5864567bbd2429","README.md":"3fa9368c60bc701dea294fbacae0469188c4be1de79f82e972bb9b321776cd52","src/lib.rs":"844d2f52dcc94a0118fab78163ff059342905e17177afbd14afcdb49e289050c","tests/xcrate.rs":"30dcb70fbb9c96fda2b7825592558279f534776f72e2a8a0a3e26df4dedb3caa"},"package":"de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"}
|
||||
{"files":{".travis.yml":"e4a302e9494e53483326b0307a2969e73fa7f3930199ad8b7be1015ee1827e03","Cargo.toml":"85c3d6ec135ebe7ba9681d76b08b4fb9ef16e70ad05fbbc5df5864567bbd2429","README.md":"3fa9368c60bc701dea294fbacae0469188c4be1de79f82e972bb9b321776cd52","src/lib.rs":"844d2f52dcc94a0118fab78163ff059342905e17177afbd14afcdb49e289050c","tests/xcrate.rs":"30dcb70fbb9c96fda2b7825592558279f534776f72e2a8a0a3e26df4dedb3caa"},"package":"de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"}
|
0
third_party/rust/cfg-if-0.1.0/.cargo-ok
vendored
0
third_party/rust/cfg-if-0.1.0/.cargo-ok
vendored
2
third_party/rust/cfg-if/.cargo-checksum.json
vendored
2
third_party/rust/cfg-if/.cargo-checksum.json
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"50f67b20a376d437e0706d9bbb0343c677295529991370b2962f814c0b2efea3","Cargo.toml":"d217067290b088db7f696e02ecc25461a0277e5e5e3bca6c7c0412b604c3526b","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"3fa9368c60bc701dea294fbacae0469188c4be1de79f82e972bb9b321776cd52","src/lib.rs":"74b287a91a46dc9d0c179053b439fd40c43ad5389fbd5199fff1cce0094726a6","tests/xcrate.rs":"30dcb70fbb9c96fda2b7825592558279f534776f72e2a8a0a3e26df4dedb3caa"},"package":"d0c47d456a36ebf0536a6705c83c1cbbcb9255fbc1d905a6ded104f479268a29"}
|
||||
{"files":{".travis.yml":"50f67b20a376d437e0706d9bbb0343c677295529991370b2962f814c0b2efea3","Cargo.toml":"d217067290b088db7f696e02ecc25461a0277e5e5e3bca6c7c0412b604c3526b","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"3fa9368c60bc701dea294fbacae0469188c4be1de79f82e972bb9b321776cd52","src/lib.rs":"74b287a91a46dc9d0c179053b439fd40c43ad5389fbd5199fff1cce0094726a6","tests/xcrate.rs":"30dcb70fbb9c96fda2b7825592558279f534776f72e2a8a0a3e26df4dedb3caa"},"package":"d0c47d456a36ebf0536a6705c83c1cbbcb9255fbc1d905a6ded104f479268a29"}
|
0
third_party/rust/cfg-if/.cargo-ok
vendored
0
third_party/rust/cfg-if/.cargo-ok
vendored
2
third_party/rust/chrono/.cargo-checksum.json
vendored
2
third_party/rust/chrono/.cargo-checksum.json
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"e4721fe8d991d6b9f58da6fba573906a759b58b49ba58cb15b0ca279b3bc53cb","AUTHORS.txt":"4ba13d189cb419382ef9837e74de67c2dba98ff1b378816de2a3f59922da598a","CHANGELOG.md":"5dcce1ee25d1e37a0fa3ce162568061787a13870297d5f95bffa44156efe8701","Cargo.toml":"d7703847fb88c9edcd69a7ce84a4098d21a6dfa2159454067cf9bd56577073ac","LICENSE.txt":"37064a3e3254d5a0c7963d476125e25762e86adadc71959549767486e37c8038","Makefile":"6901ba54f43a90422482457a9237edbee41490b394c09fe5a7d40129db7be5b0","README.md":"d674954a5135c85e2af5e6efa3480b64f16f79dcfface35b01dd837c3b942af6","src/date.rs":"54ccfd7964c1d0ef601c8818bd59c88bf2fb61b51ea78336f190f5e793a47b8d","src/datetime.rs":"400cf1666cfc7224b2e38fbab31236a07f9d75418c9c7b3962d9871e4bda51af","src/div.rs":"bf03964177e2960b0c4726f4856f12b597a59b051241e2a0121501b78825dce8","src/format/mod.rs":"ff50334f39ce537e4745424c8e1a7632a8ec5179fd9047fa0d6cf622d6ce182a","src/format/parse.rs":"0b3ac142ac27b7a32618684b18453e2fd43c7d7d7ddc9b3adbf395c5934e0f1c","src/format/parsed.rs":"6ce9196fa34f29e64a1bc14e76a35b76f4ad5bf72711df8eba2b196aad5ec811","src/format/scan.rs":"ea5ebe5ab966c70f18605edce9a55098ee5f661da1a02b0710559d76067bab79","src/format/strftime.rs":"35ee925171f8c02e876a9b4f515d6ba7eadf3fc8cc914759bee382d5821270e7","src/lib.rs":"1e88f2bdc97130bd6ec3f87bfec4d671167cd66e9daa953b7ce11ceb5ea62928","src/naive/date.rs":"ad4e6b0a4ad939afd79981015d4b2004a33f66abd3c0a3d18a0765d6b87900a1","src/naive/datetime.rs":"317ab30a8648aef7440da5a813a55a7346c24ff13953436bcae7f6888ed0a0c6","src/naive/time.rs":"dab2c7a6cbd8943a1a775c6c8a9a042fed0dacca623c741871d3969a592d733f","src/offset/fixed.rs":"9f103b5abb3927a19bfeb533db5a695451a5e474ed645c7cf1ac52649bc5fe8a","src/offset/local.rs":"c29fdd66a0dd39f32ded7834479dd8755022a791fb13be1ae5027999a86e4a9e","src/offset/mod.rs":"3e732d056a29585d3eecd74ccdbb38c050d08def9d10f0000a7328761e6c77e6","src/offset/utc.rs":"072b460f6b726877344207e68edc00507e08d8a9168f9f571b6631a0c73ea7be"},"package":"9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00"}
|
||||
{"files":{".travis.yml":"e4721fe8d991d6b9f58da6fba573906a759b58b49ba58cb15b0ca279b3bc53cb","AUTHORS.txt":"4ba13d189cb419382ef9837e74de67c2dba98ff1b378816de2a3f59922da598a","CHANGELOG.md":"5dcce1ee25d1e37a0fa3ce162568061787a13870297d5f95bffa44156efe8701","Cargo.toml":"d7703847fb88c9edcd69a7ce84a4098d21a6dfa2159454067cf9bd56577073ac","LICENSE.txt":"37064a3e3254d5a0c7963d476125e25762e86adadc71959549767486e37c8038","Makefile":"6901ba54f43a90422482457a9237edbee41490b394c09fe5a7d40129db7be5b0","README.md":"d674954a5135c85e2af5e6efa3480b64f16f79dcfface35b01dd837c3b942af6","src/date.rs":"54ccfd7964c1d0ef601c8818bd59c88bf2fb61b51ea78336f190f5e793a47b8d","src/datetime.rs":"400cf1666cfc7224b2e38fbab31236a07f9d75418c9c7b3962d9871e4bda51af","src/div.rs":"bf03964177e2960b0c4726f4856f12b597a59b051241e2a0121501b78825dce8","src/format/mod.rs":"ff50334f39ce537e4745424c8e1a7632a8ec5179fd9047fa0d6cf622d6ce182a","src/format/parse.rs":"0b3ac142ac27b7a32618684b18453e2fd43c7d7d7ddc9b3adbf395c5934e0f1c","src/format/parsed.rs":"6ce9196fa34f29e64a1bc14e76a35b76f4ad5bf72711df8eba2b196aad5ec811","src/format/scan.rs":"ea5ebe5ab966c70f18605edce9a55098ee5f661da1a02b0710559d76067bab79","src/format/strftime.rs":"35ee925171f8c02e876a9b4f515d6ba7eadf3fc8cc914759bee382d5821270e7","src/lib.rs":"1e88f2bdc97130bd6ec3f87bfec4d671167cd66e9daa953b7ce11ceb5ea62928","src/naive/date.rs":"ad4e6b0a4ad939afd79981015d4b2004a33f66abd3c0a3d18a0765d6b87900a1","src/naive/datetime.rs":"317ab30a8648aef7440da5a813a55a7346c24ff13953436bcae7f6888ed0a0c6","src/naive/time.rs":"dab2c7a6cbd8943a1a775c6c8a9a042fed0dacca623c741871d3969a592d733f","src/offset/fixed.rs":"9f103b5abb3927a19bfeb533db5a695451a5e474ed645c7cf1ac52649bc5fe8a","src/offset/local.rs":"c29fdd66a0dd39f32ded7834479dd8755022a791fb13be1ae5027999a86e4a9e","src/offset/mod.rs":"3e732d056a29585d3eecd74ccdbb38c050d08def9d10f0000a7328761e6c77e6","src/offset/utc.rs":"072b460f6b726877344207e68edc00507e08d8a9168f9f571b6631a0c73ea7be"},"package":"9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00"}
|
0
third_party/rust/chrono/.cargo-ok
vendored
0
third_party/rust/chrono/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"79d6a139814ae0f06ce0ca85fe22a27316a27d444320b904c471c7f612129889","CHANGELOG.md":"bd7194bb4c1572c3c34764853a871649bb4f8a20bd7fe6ef96aa8c49d3eb79a9","CONTRIBUTING.md":"4e2a45992604f07a37030bb1fc598c6f54a1785747c4f37a15a37481bbdecce8","Cargo.toml":"5f1795410761466bc3fbcec96a4f5d560b6ccf681bfa86b337fcf3b83ee074cb","LICENSE.txt":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","README.md":"73c5156eeff880c0c0ea80a2eb2926797fd06376118e23f842b4164ad677d4f1","appveyor.yml":"fe7033ab25bb78005136748676f59bfdd8f65b4c5c2910af911cbb9c496bdaef","build.rs":"2b934b1cd30083531d4b751f8fe22f997e07ffc35631f15a734574d1d2fa0900","ci/before_install.sh":"402f5704cd0163254b056a515a6cdfa16482eb2e28c31eb63a5c226abd26a8b7","ci/install.bat":"d694550679e14b384f8adf8384d475866e5880002cf82d450926f4607dc9077b","ci/script.sh":"1bb1cd29bd9635cc126cdcbd6c02f3500620a231a86726bf2165a4b74baaf433","ci/test_script.bat":"73462f51aaa9a1c14ce9f55c41dc3672df64faa9789725384ae4f28d8ba3c90b","clippy.toml":"acef14b9acffa18d1069ae08a4e8fe824a614f91b0bc71a6b1c68e4d885397e6","src/lib.rs":"7576ac0decd8827f2454af80631f8c7a852c0b56c28c0b08e03274a7c6e26ab0","src/link.rs":"b9f76e26fa9b1d690f6abf17e9f898d6545be149e2afe64c7411cd53e3168fcf","src/support.rs":"174534f4963a841de7c4fe14d9db6930355d99e5497ac38f42c9006440be02ef","tests/header.h":"b1cf564b21d76db78529d1934e1481a5f0452fdedc6e32954608293c310498b6","tests/lib.rs":"cc0544b0e580d79ae7a7ce0f390f979b3fabe85370b29318d5fc51c9de92599d"},"package":"611ec2e3a7623afd8a8c0d027887b6b55759d894abbf5fe11b9dc11b50d5b49a"}
|
||||
{"files":{".travis.yml":"79d6a139814ae0f06ce0ca85fe22a27316a27d444320b904c471c7f612129889","CHANGELOG.md":"bd7194bb4c1572c3c34764853a871649bb4f8a20bd7fe6ef96aa8c49d3eb79a9","CONTRIBUTING.md":"4e2a45992604f07a37030bb1fc598c6f54a1785747c4f37a15a37481bbdecce8","Cargo.toml":"5f1795410761466bc3fbcec96a4f5d560b6ccf681bfa86b337fcf3b83ee074cb","LICENSE.txt":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","README.md":"73c5156eeff880c0c0ea80a2eb2926797fd06376118e23f842b4164ad677d4f1","appveyor.yml":"fe7033ab25bb78005136748676f59bfdd8f65b4c5c2910af911cbb9c496bdaef","build.rs":"2b934b1cd30083531d4b751f8fe22f997e07ffc35631f15a734574d1d2fa0900","ci/before_install.sh":"402f5704cd0163254b056a515a6cdfa16482eb2e28c31eb63a5c226abd26a8b7","ci/install.bat":"d694550679e14b384f8adf8384d475866e5880002cf82d450926f4607dc9077b","ci/script.sh":"1bb1cd29bd9635cc126cdcbd6c02f3500620a231a86726bf2165a4b74baaf433","ci/test_script.bat":"73462f51aaa9a1c14ce9f55c41dc3672df64faa9789725384ae4f28d8ba3c90b","clippy.toml":"acef14b9acffa18d1069ae08a4e8fe824a614f91b0bc71a6b1c68e4d885397e6","src/lib.rs":"7576ac0decd8827f2454af80631f8c7a852c0b56c28c0b08e03274a7c6e26ab0","src/link.rs":"b9f76e26fa9b1d690f6abf17e9f898d6545be149e2afe64c7411cd53e3168fcf","src/support.rs":"174534f4963a841de7c4fe14d9db6930355d99e5497ac38f42c9006440be02ef","tests/header.h":"b1cf564b21d76db78529d1934e1481a5f0452fdedc6e32954608293c310498b6","tests/lib.rs":"cc0544b0e580d79ae7a7ce0f390f979b3fabe85370b29318d5fc51c9de92599d"},"package":"611ec2e3a7623afd8a8c0d027887b6b55759d894abbf5fe11b9dc11b50d5b49a"}
|
0
third_party/rust/clang-sys/.cargo-ok
vendored
0
third_party/rust/clang-sys/.cargo-ok
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".clog.toml":"f691701bd51b5f311931d0d8f05fa3d78c00dda8d60f3313e21011309c736ff1",".github/CONTRIBUTING.md":"f7eff737f3aa25294802fefb233e3758a64b248781dbbf3262532d693f340a87",".github/ISSUE_TEMPLATE.md":"681afbd64b3603e3e82789ceb6841d851eaa7333caec5769173462bab1b5d82b",".travis.yml":"2975b3159624d4ecc4dd29577f378e9d4fa27f1991bfd5042ac3c267fb2cdd38","CHANGELOG.md":"82b23419a6964c8f80993b399c9dded5b7fd809ba51f5f806c2a139d3c6270a4","CONTRIBUTORS.md":"5d7dbafaff6879bbfbb01b22cca299953ec163872d8d624bbf99e20851ca0165","Cargo.toml":"94e3789815bfd001abf96cb0d10fa95a4b4576bc679539e79a531d0010e2ccdd","LICENSE-MIT":"6725d1437fc6c77301f2ff0e7d52914cf4f9509213e1078dc77d9356dbe6eac5","README.md":"031031971829f165ed7ffd8375c2249ce96336a9ed7f207d4722df05563d2d7e","appveyor.yml":"303c64c2cc84c24b3c9ac0b4cd66b98d6bb25dec7d030ed53e5cb6ab3f13ebd1","clap-test.rs":"a0b0d9ca9106a52bf9dc41cf52b0b87c98209dca3490caa6ec1452bd1fec5c4c","index.html":"36f9ce4465266f3af9a259444b01c4239200473cabfc848f789f75b322a3ea8f","justfile":"811b2dec57aec46e570aeeb9945018cf87fe65f6d5b27cdb9ffca79d906910f6","rustfmt.toml":"8fd2d63119df515fd5f44e530c709b19d66b09fbc2e22a640bf4b64c57e7d6b3","src/app/help.rs":"da53217886fb1ea289b9057d4b5e94dce74ce81a7b7006d216370aad709bff77","src/app/macros.rs":"0205c461041d917aecb4a15212f89908e72902b961f47014a645f2b061de5998","src/app/meta.rs":"a56d28bb466a8ba68155b3f2883e85228b4b74cf25658f62fc050e07cff2dc85","src/app/mod.rs":"d0e1843ae1f77c1da4179cebdd8fb1ea55803002fb1ae96087de3a8cdcedf6fc","src/app/parser.rs":"66b08057b7bc19f6c2c94671de7fc20ec623368e04f92d2a6775991d37430fc2","src/app/settings.rs":"cf9f4a1a9d3799ac30d1d98cf23987cc884435ad912a0dfd853b101ce86c97cc","src/app/usage.rs":"ecaeab6c7980544e9a2d35cc41f2797df8bc9c09f5da67e96286631a116c0ccc","src/app/validator.rs":"f19d876ac673019ed5fdd4b9f76ba598fa790aa5e64d482696ca1e45dce5f28b","src/args/any_arg.rs":"b082385eeff2505ced7b747bd44d20a3fb6fd9d4bd14be9e99870699c43ea072","src/args/arg.rs":"673de3f1957eccb1b116255bac9638fe24c0da54ccb358d958446c8ed54c9621","src/args/arg_builder/base.rs":"8b99a9ab811df3e0bdcfba8c0994042b0bcd06d8ddf794ab559baaf9a490ba59","src/args/arg_builder/flag.rs":"4007a950869789b1f4d5f953107aee228477e2d5fe82515d3b895286c65522c6","src/args/arg_builder/mod.rs":"7a32c8fd85b48f7b60e5f2c13dc70fa9100aa65cd933ba419300d28d682bf722","src/args/arg_builder/option.rs":"d5e5243e3a72d2c820c8fad4e1efc4b985881c6f60f3a72757b33a9054a87e99","src/args/arg_builder/positional.rs":"39615d22b586e744a0bdeb8490dbe43df7df66ed793abf8f50ed2037ec0fb90c","src/args/arg_builder/switched.rs":"61f5121b0ec746461215a47e1b7a4d699a37a3f181172820e0615f68d5f6f0ef","src/args/arg_builder/valued.rs":"19368a03e046d6b63451c3d04dff6e51d49f140ed45330f82879539c6d1b28dd","src/args/arg_matcher.rs":"27829739ae12ac7800a26109e751ce9f8c3d26e262d41de161a38baf5c421167","src/args/arg_matches.rs":"9d72a388053ef0c31fe2516df9ea791a4d0f6c0b5e9758eb61886f1ac8df89ab","src/args/group.rs":"3f72a6ecc6ff71c96dd9cd8098e4fb6f7c4e6207e9bd0b67a50b104f5dfdb23d","src/args/macros.rs":"0dd7ae4c6e26ed78044c3ef90e21259816e544f724dcb09e6a0d92d4fcbc4b1a","src/args/matched_arg.rs":"1ed8d338869ecc3b5fa426ef4cf42f4c9c3b1dd538cdea1fe0489169345536f7","src/args/mod.rs":"c155cd989fa4ca1f8de6a79115afbf5086f092adcb854ff9698b9100f45fc323","src/args/settings.rs":"e6bbfb49c2e38fcedb67481bcbf0eb887ee510031639be8134411121a9363f7e","src/args/subcommand.rs":"e1ad9638c33785f1301675de1795b0a4f4b079452aa11f7526d263c2a1179432","src/completions/bash.rs":"116c6830ee2b6310f299a69924f5b1e39b05ebec2b5f7b0ffe3b6938b7fa5514","src/completions/fish.rs":"63975f8beea9af6bef66c7dd7938bfa61c6f871995a74dbc1545daa9fbc1f2d0","src/completions/macros.rs":"ebad5037e6e63401b1a54498e09d3bd93d1a3a06f045c2990902d47eb9a73774","src/completions/mod.rs":"5d4a734df6a21e6c1e0831a2f7be50a45d2e7bdaf7475589ea78b978643229cd","src/completions/powershell.rs":"4267818aaa60583c055d7a276a7535309e5162c94467f3003799b6a8a7f6d6b0","src/completions/shell.rs":"c7995ca229fd0d8671761da0aca0513c4f740165f02d06cd97aa0ae881c22cd4","src/completions/zsh.rs":"8ac4576e1cb3b1403dbb35ce146159aa8b29864e1d8201776200d999052b422d","src/errors.rs":"5d0ab536ea62614a6cf88d175a5b5e9c2777a35958e1d4598ac1ec4a6f451593","src/fmt.rs":"42459e7f42f5495c005d2de3eaf8d7b5619bf4b8d245ecb76e583f08ecaa3869","src/lib.rs":"3471c5b046df081afecb4e541d4e55dc7afa34bf7fe8f369f301f6471887e930","src/macros.rs":"c1d40220947c62b0364eedd2c40ca2c414daccc334a1e04e029a884e782bf2b0","src/osstringext.rs":"a87a5a0685dd8310f6329d5f8e8f54c0fac68eb75595a835aeb1c36208efd5f9","src/strext.rs":"d4418d396069e9c05804f92c042ba7192a4244e46059e2edc98670b45cd2daee","src/suggestions.rs":"ca352c62cdcc1b6071c50e39f39e8f5f6cd11c318229cc6cf16511dfde43c5c7","src/usage_parser.rs":"a04143bba42a6506746091a3f898c38e2c7409bacefed21fa8194c90961ca390"},"package":"6b8f69e518f967224e628896b54e41ff6acfb4dcfefc5076325c36525dac900f"}
|
||||
{"files":{".clog.toml":"f691701bd51b5f311931d0d8f05fa3d78c00dda8d60f3313e21011309c736ff1",".github/CONTRIBUTING.md":"f7eff737f3aa25294802fefb233e3758a64b248781dbbf3262532d693f340a87",".github/ISSUE_TEMPLATE.md":"681afbd64b3603e3e82789ceb6841d851eaa7333caec5769173462bab1b5d82b",".travis.yml":"2975b3159624d4ecc4dd29577f378e9d4fa27f1991bfd5042ac3c267fb2cdd38","CHANGELOG.md":"82b23419a6964c8f80993b399c9dded5b7fd809ba51f5f806c2a139d3c6270a4","CONTRIBUTORS.md":"5d7dbafaff6879bbfbb01b22cca299953ec163872d8d624bbf99e20851ca0165","Cargo.toml":"94e3789815bfd001abf96cb0d10fa95a4b4576bc679539e79a531d0010e2ccdd","LICENSE-MIT":"6725d1437fc6c77301f2ff0e7d52914cf4f9509213e1078dc77d9356dbe6eac5","README.md":"031031971829f165ed7ffd8375c2249ce96336a9ed7f207d4722df05563d2d7e","appveyor.yml":"303c64c2cc84c24b3c9ac0b4cd66b98d6bb25dec7d030ed53e5cb6ab3f13ebd1","clap-test.rs":"a0b0d9ca9106a52bf9dc41cf52b0b87c98209dca3490caa6ec1452bd1fec5c4c","index.html":"36f9ce4465266f3af9a259444b01c4239200473cabfc848f789f75b322a3ea8f","justfile":"811b2dec57aec46e570aeeb9945018cf87fe65f6d5b27cdb9ffca79d906910f6","rustfmt.toml":"8fd2d63119df515fd5f44e530c709b19d66b09fbc2e22a640bf4b64c57e7d6b3","src/app/help.rs":"da53217886fb1ea289b9057d4b5e94dce74ce81a7b7006d216370aad709bff77","src/app/macros.rs":"0205c461041d917aecb4a15212f89908e72902b961f47014a645f2b061de5998","src/app/meta.rs":"a56d28bb466a8ba68155b3f2883e85228b4b74cf25658f62fc050e07cff2dc85","src/app/mod.rs":"d0e1843ae1f77c1da4179cebdd8fb1ea55803002fb1ae96087de3a8cdcedf6fc","src/app/parser.rs":"66b08057b7bc19f6c2c94671de7fc20ec623368e04f92d2a6775991d37430fc2","src/app/settings.rs":"cf9f4a1a9d3799ac30d1d98cf23987cc884435ad912a0dfd853b101ce86c97cc","src/app/usage.rs":"ecaeab6c7980544e9a2d35cc41f2797df8bc9c09f5da67e96286631a116c0ccc","src/app/validator.rs":"f19d876ac673019ed5fdd4b9f76ba598fa790aa5e64d482696ca1e45dce5f28b","src/args/any_arg.rs":"b082385eeff2505ced7b747bd44d20a3fb6fd9d4bd14be9e99870699c43ea072","src/args/arg.rs":"673de3f1957eccb1b116255bac9638fe24c0da54ccb358d958446c8ed54c9621","src/args/arg_builder/base.rs":"8b99a9ab811df3e0bdcfba8c0994042b0bcd06d8ddf794ab559baaf9a490ba59","src/args/arg_builder/flag.rs":"4007a950869789b1f4d5f953107aee228477e2d5fe82515d3b895286c65522c6","src/args/arg_builder/mod.rs":"7a32c8fd85b48f7b60e5f2c13dc70fa9100aa65cd933ba419300d28d682bf722","src/args/arg_builder/option.rs":"d5e5243e3a72d2c820c8fad4e1efc4b985881c6f60f3a72757b33a9054a87e99","src/args/arg_builder/positional.rs":"39615d22b586e744a0bdeb8490dbe43df7df66ed793abf8f50ed2037ec0fb90c","src/args/arg_builder/switched.rs":"61f5121b0ec746461215a47e1b7a4d699a37a3f181172820e0615f68d5f6f0ef","src/args/arg_builder/valued.rs":"19368a03e046d6b63451c3d04dff6e51d49f140ed45330f82879539c6d1b28dd","src/args/arg_matcher.rs":"27829739ae12ac7800a26109e751ce9f8c3d26e262d41de161a38baf5c421167","src/args/arg_matches.rs":"9d72a388053ef0c31fe2516df9ea791a4d0f6c0b5e9758eb61886f1ac8df89ab","src/args/group.rs":"3f72a6ecc6ff71c96dd9cd8098e4fb6f7c4e6207e9bd0b67a50b104f5dfdb23d","src/args/macros.rs":"0dd7ae4c6e26ed78044c3ef90e21259816e544f724dcb09e6a0d92d4fcbc4b1a","src/args/matched_arg.rs":"1ed8d338869ecc3b5fa426ef4cf42f4c9c3b1dd538cdea1fe0489169345536f7","src/args/mod.rs":"c155cd989fa4ca1f8de6a79115afbf5086f092adcb854ff9698b9100f45fc323","src/args/settings.rs":"e6bbfb49c2e38fcedb67481bcbf0eb887ee510031639be8134411121a9363f7e","src/args/subcommand.rs":"e1ad9638c33785f1301675de1795b0a4f4b079452aa11f7526d263c2a1179432","src/completions/bash.rs":"116c6830ee2b6310f299a69924f5b1e39b05ebec2b5f7b0ffe3b6938b7fa5514","src/completions/fish.rs":"63975f8beea9af6bef66c7dd7938bfa61c6f871995a74dbc1545daa9fbc1f2d0","src/completions/macros.rs":"ebad5037e6e63401b1a54498e09d3bd93d1a3a06f045c2990902d47eb9a73774","src/completions/mod.rs":"5d4a734df6a21e6c1e0831a2f7be50a45d2e7bdaf7475589ea78b978643229cd","src/completions/powershell.rs":"4267818aaa60583c055d7a276a7535309e5162c94467f3003799b6a8a7f6d6b0","src/completions/shell.rs":"c7995ca229fd0d8671761da0aca0513c4f740165f02d06cd97aa0ae881c22cd4","src/completions/zsh.rs":"8ac4576e1cb3b1403dbb35ce146159aa8b29864e1d8201776200d999052b422d","src/errors.rs":"5d0ab536ea62614a6cf88d175a5b5e9c2777a35958e1d4598ac1ec4a6f451593","src/fmt.rs":"42459e7f42f5495c005d2de3eaf8d7b5619bf4b8d245ecb76e583f08ecaa3869","src/lib.rs":"3471c5b046df081afecb4e541d4e55dc7afa34bf7fe8f369f301f6471887e930","src/macros.rs":"c1d40220947c62b0364eedd2c40ca2c414daccc334a1e04e029a884e782bf2b0","src/osstringext.rs":"a87a5a0685dd8310f6329d5f8e8f54c0fac68eb75595a835aeb1c36208efd5f9","src/strext.rs":"d4418d396069e9c05804f92c042ba7192a4244e46059e2edc98670b45cd2daee","src/suggestions.rs":"ca352c62cdcc1b6071c50e39f39e8f5f6cd11c318229cc6cf16511dfde43c5c7","src/usage_parser.rs":"a04143bba42a6506746091a3f898c38e2c7409bacefed21fa8194c90961ca390"},"package":"6b8f69e518f967224e628896b54e41ff6acfb4dcfefc5076325c36525dac900f"}
|
0
third_party/rust/clap-2.24.2/.cargo-ok
vendored
0
third_party/rust/clap-2.24.2/.cargo-ok
vendored
2
third_party/rust/clap/.cargo-checksum.json
vendored
2
third_party/rust/clap/.cargo-checksum.json
vendored
File diff suppressed because one or more lines are too long
0
third_party/rust/clap/.cargo-ok
vendored
0
third_party/rust/clap/.cargo-ok
vendored
2
third_party/rust/cmake/.cargo-checksum.json
vendored
2
third_party/rust/cmake/.cargo-checksum.json
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"c5565ac6e1981bf3a88d132c16e381411a239a1c25ec140ee13cf2d50f1f97d0","Cargo.toml":"b00470e46ebb5985066646479d788b7ceb4ec7155c5d0bc99d78230e323c5745","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"8ca528d20639506546044c676ff9069e3e850937b02bff4194dcf9e5c3c50d64","src/lib.rs":"414fe90372fa7c7f67853af871f2ca30c117abe406b405719e615b581a9f55ff"},"package":"b8ebbb35d3dc9cd09497168f33de1acb79b265d350ab0ac34133b98f8509af1f"}
|
||||
{"files":{".travis.yml":"c5565ac6e1981bf3a88d132c16e381411a239a1c25ec140ee13cf2d50f1f97d0","Cargo.toml":"b00470e46ebb5985066646479d788b7ceb4ec7155c5d0bc99d78230e323c5745","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"8ca528d20639506546044c676ff9069e3e850937b02bff4194dcf9e5c3c50d64","src/lib.rs":"414fe90372fa7c7f67853af871f2ca30c117abe406b405719e615b581a9f55ff"},"package":"b8ebbb35d3dc9cd09497168f33de1acb79b265d350ab0ac34133b98f8509af1f"}
|
0
third_party/rust/cmake/.cargo-ok
vendored
0
third_party/rust/cmake/.cargo-ok
vendored
2
third_party/rust/coco/.cargo-checksum.json
vendored
2
third_party/rust/coco/.cargo-checksum.json
vendored
@ -1 +1 @@
|
||||
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".travis.yml":"b4ea42f2ade2f287c4b0b6eee0e34437ec7cad7462832c18c397372b2a18aef1","CHANGELOG.md":"255242d56d5ce66921e03665a7b4b87be94c4b2ca7c4333f6569abe45321f992","Cargo.toml":"3aeb19f8e670699b19d0627c2466e8a859a02d3b8697c2054ac1ce8f82876c3e","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"7c3ce82aaba8e7bb81a62e1c99eb4c62c0116cd0832e343be5a52ec5e20942cb","benches/bench.rs":"ab1b7a1db73425735405fc214606c9ec783b350001f1be376ebf43cd4a540b67","ci/script.sh":"878f8b0a1d77d51834c152b299e6ef7b9c7d24a7ca2fbefe5070e9d2a72532c9","src/deque.rs":"5eaa6bec7c61435abebb35d52e9e02a6bb164c92d6c078f634e2b941f03e033d","src/epoch/atomic.rs":"1b7ed6f5abc0860a71a2d07f9099a4c0c7f274f7fe2a09733b64bf9f1a72fcd1","src/epoch/garbage.rs":"b1b35659796008001a8cb4a9edad7c101091f5ba45515cc5d64ef1ec862d36af","src/epoch/mod.rs":"0c83566f179b125ce37d40d5ba1c8731b3baa29fc0c46f966eeb44d1cb41502c","src/epoch/thread.rs":"cb8d17c75763004f4d3b227a7b710b1c8cbf3c5adc87d8346db57b2f8af59b27","src/lib.rs":"4b01d1e4bea889496b8c22713caaf34c65339aa8582e8b903fd3e0395c830a4a","src/stack.rs":"c1186eadfce0b83c3df2211cf15e0d2426b3a8fc3cd7726eca4e73851a502b60"},"package":"c06169f5beb7e31c7c67ebf5540b8b472d23e3eade3b2ec7d1f5b504a85f91bd"}
|
||||
{"files":{".travis.yml":"b4ea42f2ade2f287c4b0b6eee0e34437ec7cad7462832c18c397372b2a18aef1","CHANGELOG.md":"255242d56d5ce66921e03665a7b4b87be94c4b2ca7c4333f6569abe45321f992","Cargo.toml":"3aeb19f8e670699b19d0627c2466e8a859a02d3b8697c2054ac1ce8f82876c3e","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"7c3ce82aaba8e7bb81a62e1c99eb4c62c0116cd0832e343be5a52ec5e20942cb","benches/bench.rs":"ab1b7a1db73425735405fc214606c9ec783b350001f1be376ebf43cd4a540b67","ci/script.sh":"878f8b0a1d77d51834c152b299e6ef7b9c7d24a7ca2fbefe5070e9d2a72532c9","src/deque.rs":"5eaa6bec7c61435abebb35d52e9e02a6bb164c92d6c078f634e2b941f03e033d","src/epoch/atomic.rs":"1b7ed6f5abc0860a71a2d07f9099a4c0c7f274f7fe2a09733b64bf9f1a72fcd1","src/epoch/garbage.rs":"b1b35659796008001a8cb4a9edad7c101091f5ba45515cc5d64ef1ec862d36af","src/epoch/mod.rs":"0c83566f179b125ce37d40d5ba1c8731b3baa29fc0c46f966eeb44d1cb41502c","src/epoch/thread.rs":"cb8d17c75763004f4d3b227a7b710b1c8cbf3c5adc87d8346db57b2f8af59b27","src/lib.rs":"4b01d1e4bea889496b8c22713caaf34c65339aa8582e8b903fd3e0395c830a4a","src/stack.rs":"c1186eadfce0b83c3df2211cf15e0d2426b3a8fc3cd7726eca4e73851a502b60"},"package":"c06169f5beb7e31c7c67ebf5540b8b472d23e3eade3b2ec7d1f5b504a85f91bd"}
|
0
third_party/rust/coco/.cargo-ok
vendored
0
third_party/rust/coco/.cargo-ok
vendored
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user