From 2aa4a82499d4becd2284cdb482213d541b8804dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 16:29:10 +0200 Subject: Adding upstream version 86.0.1. Signed-off-by: Daniel Baumann --- third_party/rust/toml/.cargo-checksum.json | 1 + third_party/rust/toml/Cargo.toml | 33 + third_party/rust/toml/LICENSE-APACHE | 201 +++ third_party/rust/toml/LICENSE-MIT | 25 + third_party/rust/toml/README.md | 31 + third_party/rust/toml/examples/decode.rs | 56 + third_party/rust/toml/examples/toml2json.rs | 51 + third_party/rust/toml/src/datetime.rs | 425 +++++ third_party/rust/toml/src/de.rs | 1327 +++++++++++++++ third_party/rust/toml/src/lib.rs | 168 ++ third_party/rust/toml/src/ser.rs | 1714 ++++++++++++++++++++ third_party/rust/toml/src/tokens.rs | 620 +++++++ third_party/rust/toml/src/value.rs | 946 +++++++++++ third_party/rust/toml/tests/README.md | 1 + third_party/rust/toml/tests/backcompat.rs | 19 + third_party/rust/toml/tests/datetime.rs | 58 + third_party/rust/toml/tests/display-tricky.rs | 49 + third_party/rust/toml/tests/display.rs | 103 ++ third_party/rust/toml/tests/formatting.rs | 55 + .../rust/toml/tests/invalid-encoder-misc.rs | 14 + .../array-mixed-types-ints-and-floats.json | 15 + third_party/rust/toml/tests/invalid-misc.rs | 17 + third_party/rust/toml/tests/invalid.rs | 98 ++ .../invalid/array-mixed-types-arrays-and-ints.toml | 1 + .../invalid/array-mixed-types-ints-and-floats.toml | 1 + .../array-mixed-types-strings-and-ints.toml | 1 + .../tests/invalid/datetime-malformed-no-leads.toml | 1 + .../tests/invalid/datetime-malformed-no-secs.toml | 1 + .../tests/invalid/datetime-malformed-no-t.toml | 1 + .../invalid/datetime-malformed-with-milli.toml | 1 + .../toml/tests/invalid/duplicate-key-table.toml | 5 + .../rust/toml/tests/invalid/duplicate-keys.toml | 2 + .../rust/toml/tests/invalid/duplicate-tables.toml | 2 + .../toml/tests/invalid/empty-implicit-table.toml | 1 + .../rust/toml/tests/invalid/empty-table.toml | 1 + .../toml/tests/invalid/float-no-leading-zero.toml | 2 + .../tests/invalid/float-no-trailing-digits.toml | 2 + .../rust/toml/tests/invalid/key-after-array.toml | 1 + .../rust/toml/tests/invalid/key-after-table.toml | 1 + third_party/rust/toml/tests/invalid/key-empty.toml | 1 + third_party/rust/toml/tests/invalid/key-hash.toml | 1 + .../rust/toml/tests/invalid/key-newline.toml | 2 + .../rust/toml/tests/invalid/key-open-bracket.toml | 1 + .../tests/invalid/key-single-open-bracket.toml | 1 + third_party/rust/toml/tests/invalid/key-space.toml | 1 + .../rust/toml/tests/invalid/key-start-bracket.toml | 3 + .../rust/toml/tests/invalid/key-two-equals.toml | 1 + .../toml/tests/invalid/string-bad-byte-escape.toml | 1 + .../rust/toml/tests/invalid/string-bad-escape.toml | 1 + .../toml/tests/invalid/string-byte-escapes.toml | 1 + .../rust/toml/tests/invalid/string-no-close.toml | 1 + .../toml/tests/invalid/table-array-implicit.toml | 14 + .../invalid/table-array-malformed-bracket.toml | 2 + .../tests/invalid/table-array-malformed-empty.toml | 2 + .../rust/toml/tests/invalid/table-empty.toml | 1 + .../tests/invalid/table-nested-brackets-close.toml | 2 + .../tests/invalid/table-nested-brackets-open.toml | 2 + .../rust/toml/tests/invalid/table-whitespace.toml | 1 + .../rust/toml/tests/invalid/table-with-pound.toml | 2 + .../tests/invalid/text-after-array-entries.toml | 4 + .../toml/tests/invalid/text-after-integer.toml | 1 + .../rust/toml/tests/invalid/text-after-string.toml | 1 + .../rust/toml/tests/invalid/text-after-table.toml | 1 + .../tests/invalid/text-before-array-separator.toml | 4 + .../rust/toml/tests/invalid/text-in-array.toml | 5 + third_party/rust/toml/tests/parser.rs | 495 ++++++ third_party/rust/toml/tests/pretty.rs | 308 ++++ third_party/rust/toml/tests/serde.rs | 578 +++++++ third_party/rust/toml/tests/tables-last.rs | 30 + third_party/rust/toml/tests/valid.rs | 249 +++ third_party/rust/toml/tests/valid/array-empty.json | 11 + third_party/rust/toml/tests/valid/array-empty.toml | 1 + .../rust/toml/tests/valid/array-nospaces.json | 10 + .../rust/toml/tests/valid/array-nospaces.toml | 1 + .../rust/toml/tests/valid/arrays-hetergeneous.json | 19 + .../rust/toml/tests/valid/arrays-hetergeneous.toml | 1 + .../rust/toml/tests/valid/arrays-nested.json | 13 + .../rust/toml/tests/valid/arrays-nested.toml | 1 + third_party/rust/toml/tests/valid/arrays.json | 34 + third_party/rust/toml/tests/valid/arrays.toml | 8 + third_party/rust/toml/tests/valid/bool.json | 4 + third_party/rust/toml/tests/valid/bool.toml | 2 + .../rust/toml/tests/valid/comments-everywhere.json | 12 + .../rust/toml/tests/valid/comments-everywhere.toml | 24 + .../rust/toml/tests/valid/datetime-truncate.json | 6 + .../rust/toml/tests/valid/datetime-truncate.toml | 1 + third_party/rust/toml/tests/valid/datetime.json | 3 + third_party/rust/toml/tests/valid/datetime.toml | 1 + third_party/rust/toml/tests/valid/empty.json | 1 + third_party/rust/toml/tests/valid/empty.toml | 0 third_party/rust/toml/tests/valid/example-bom.toml | 5 + .../rust/toml/tests/valid/example-v0.3.0.json | 1 + .../rust/toml/tests/valid/example-v0.3.0.toml | 182 +++ .../rust/toml/tests/valid/example-v0.4.0.json | 1 + .../rust/toml/tests/valid/example-v0.4.0.toml | 235 +++ third_party/rust/toml/tests/valid/example.json | 14 + third_party/rust/toml/tests/valid/example.toml | 5 + third_party/rust/toml/tests/valid/example2.json | 1 + third_party/rust/toml/tests/valid/example2.toml | 47 + third_party/rust/toml/tests/valid/float.json | 4 + third_party/rust/toml/tests/valid/float.toml | 2 + .../rust/toml/tests/valid/hard_example.json | 1 + .../rust/toml/tests/valid/hard_example.toml | 33 + .../tests/valid/implicit-and-explicit-after.json | 10 + .../tests/valid/implicit-and-explicit-after.toml | 5 + .../tests/valid/implicit-and-explicit-before.json | 10 + .../tests/valid/implicit-and-explicit-before.toml | 5 + .../rust/toml/tests/valid/implicit-groups.json | 9 + .../rust/toml/tests/valid/implicit-groups.toml | 2 + third_party/rust/toml/tests/valid/integer.json | 4 + third_party/rust/toml/tests/valid/integer.toml | 2 + .../rust/toml/tests/valid/key-equals-nospace.json | 3 + .../rust/toml/tests/valid/key-equals-nospace.toml | 1 + .../rust/toml/tests/valid/key-quote-newline.json | 3 + .../rust/toml/tests/valid/key-quote-newline.toml | 1 + third_party/rust/toml/tests/valid/key-space.json | 3 + third_party/rust/toml/tests/valid/key-space.toml | 1 + .../rust/toml/tests/valid/key-special-chars.json | 5 + .../rust/toml/tests/valid/key-special-chars.toml | 1 + .../rust/toml/tests/valid/key-with-pound.json | 3 + .../rust/toml/tests/valid/key-with-pound.toml | 1 + third_party/rust/toml/tests/valid/long-float.json | 4 + third_party/rust/toml/tests/valid/long-float.toml | 2 + .../rust/toml/tests/valid/long-integer.json | 4 + .../rust/toml/tests/valid/long-integer.toml | 2 + .../rust/toml/tests/valid/multiline-string.json | 30 + .../rust/toml/tests/valid/multiline-string.toml | 23 + .../toml/tests/valid/raw-multiline-string.json | 14 + .../toml/tests/valid/raw-multiline-string.toml | 9 + third_party/rust/toml/tests/valid/raw-string.json | 30 + third_party/rust/toml/tests/valid/raw-string.toml | 7 + .../rust/toml/tests/valid/string-empty.json | 6 + .../rust/toml/tests/valid/string-empty.toml | 1 + .../rust/toml/tests/valid/string-escapes.json | 50 + .../rust/toml/tests/valid/string-escapes.toml | 12 + .../rust/toml/tests/valid/string-simple.json | 6 + .../rust/toml/tests/valid/string-simple.toml | 1 + .../rust/toml/tests/valid/string-with-pound.json | 7 + .../rust/toml/tests/valid/string-with-pound.toml | 2 + .../toml/tests/valid/table-array-implicit.json | 7 + .../toml/tests/valid/table-array-implicit.toml | 2 + .../rust/toml/tests/valid/table-array-many.json | 16 + .../rust/toml/tests/valid/table-array-many.toml | 11 + .../toml/tests/valid/table-array-nest-no-keys.json | 14 + .../toml/tests/valid/table-array-nest-no-keys.toml | 6 + .../rust/toml/tests/valid/table-array-nest.json | 18 + .../rust/toml/tests/valid/table-array-nest.toml | 17 + .../rust/toml/tests/valid/table-array-one.json | 8 + .../rust/toml/tests/valid/table-array-one.toml | 3 + third_party/rust/toml/tests/valid/table-empty.json | 3 + third_party/rust/toml/tests/valid/table-empty.toml | 1 + .../rust/toml/tests/valid/table-multi-empty.json | 5 + .../rust/toml/tests/valid/table-multi-empty.toml | 5 + .../rust/toml/tests/valid/table-sub-empty.json | 3 + .../rust/toml/tests/valid/table-sub-empty.toml | 2 + .../rust/toml/tests/valid/table-whitespace.json | 3 + .../rust/toml/tests/valid/table-whitespace.toml | 1 + .../rust/toml/tests/valid/table-with-pound.json | 5 + .../rust/toml/tests/valid/table-with-pound.toml | 2 + .../rust/toml/tests/valid/unicode-escape.json | 5 + .../rust/toml/tests/valid/unicode-escape.toml | 3 + .../rust/toml/tests/valid/unicode-literal.json | 3 + .../rust/toml/tests/valid/unicode-literal.toml | 1 + 163 files changed, 8875 insertions(+) create mode 100644 third_party/rust/toml/.cargo-checksum.json create mode 100644 third_party/rust/toml/Cargo.toml create mode 100644 third_party/rust/toml/LICENSE-APACHE create mode 100644 third_party/rust/toml/LICENSE-MIT create mode 100644 third_party/rust/toml/README.md create mode 100644 third_party/rust/toml/examples/decode.rs create mode 100644 third_party/rust/toml/examples/toml2json.rs create mode 100644 third_party/rust/toml/src/datetime.rs create mode 100644 third_party/rust/toml/src/de.rs create mode 100644 third_party/rust/toml/src/lib.rs create mode 100644 third_party/rust/toml/src/ser.rs create mode 100644 third_party/rust/toml/src/tokens.rs create mode 100644 third_party/rust/toml/src/value.rs create mode 100644 third_party/rust/toml/tests/README.md create mode 100644 third_party/rust/toml/tests/backcompat.rs create mode 100644 third_party/rust/toml/tests/datetime.rs create mode 100644 third_party/rust/toml/tests/display-tricky.rs create mode 100644 third_party/rust/toml/tests/display.rs create mode 100644 third_party/rust/toml/tests/formatting.rs create mode 100644 third_party/rust/toml/tests/invalid-encoder-misc.rs create mode 100644 third_party/rust/toml/tests/invalid-encoder/array-mixed-types-ints-and-floats.json create mode 100644 third_party/rust/toml/tests/invalid-misc.rs create mode 100644 third_party/rust/toml/tests/invalid.rs create mode 100644 third_party/rust/toml/tests/invalid/array-mixed-types-arrays-and-ints.toml create mode 100644 third_party/rust/toml/tests/invalid/array-mixed-types-ints-and-floats.toml create mode 100644 third_party/rust/toml/tests/invalid/array-mixed-types-strings-and-ints.toml create mode 100644 third_party/rust/toml/tests/invalid/datetime-malformed-no-leads.toml create mode 100644 third_party/rust/toml/tests/invalid/datetime-malformed-no-secs.toml create mode 100644 third_party/rust/toml/tests/invalid/datetime-malformed-no-t.toml create mode 100644 third_party/rust/toml/tests/invalid/datetime-malformed-with-milli.toml create mode 100644 third_party/rust/toml/tests/invalid/duplicate-key-table.toml create mode 100644 third_party/rust/toml/tests/invalid/duplicate-keys.toml create mode 100644 third_party/rust/toml/tests/invalid/duplicate-tables.toml create mode 100644 third_party/rust/toml/tests/invalid/empty-implicit-table.toml create mode 100644 third_party/rust/toml/tests/invalid/empty-table.toml create mode 100644 third_party/rust/toml/tests/invalid/float-no-leading-zero.toml create mode 100644 third_party/rust/toml/tests/invalid/float-no-trailing-digits.toml create mode 100644 third_party/rust/toml/tests/invalid/key-after-array.toml create mode 100644 third_party/rust/toml/tests/invalid/key-after-table.toml create mode 100644 third_party/rust/toml/tests/invalid/key-empty.toml create mode 100644 third_party/rust/toml/tests/invalid/key-hash.toml create mode 100644 third_party/rust/toml/tests/invalid/key-newline.toml create mode 100644 third_party/rust/toml/tests/invalid/key-open-bracket.toml create mode 100644 third_party/rust/toml/tests/invalid/key-single-open-bracket.toml create mode 100644 third_party/rust/toml/tests/invalid/key-space.toml create mode 100644 third_party/rust/toml/tests/invalid/key-start-bracket.toml create mode 100644 third_party/rust/toml/tests/invalid/key-two-equals.toml create mode 100644 third_party/rust/toml/tests/invalid/string-bad-byte-escape.toml create mode 100644 third_party/rust/toml/tests/invalid/string-bad-escape.toml create mode 100644 third_party/rust/toml/tests/invalid/string-byte-escapes.toml create mode 100644 third_party/rust/toml/tests/invalid/string-no-close.toml create mode 100644 third_party/rust/toml/tests/invalid/table-array-implicit.toml create mode 100644 third_party/rust/toml/tests/invalid/table-array-malformed-bracket.toml create mode 100644 third_party/rust/toml/tests/invalid/table-array-malformed-empty.toml create mode 100644 third_party/rust/toml/tests/invalid/table-empty.toml create mode 100644 third_party/rust/toml/tests/invalid/table-nested-brackets-close.toml create mode 100644 third_party/rust/toml/tests/invalid/table-nested-brackets-open.toml create mode 100644 third_party/rust/toml/tests/invalid/table-whitespace.toml create mode 100644 third_party/rust/toml/tests/invalid/table-with-pound.toml create mode 100644 third_party/rust/toml/tests/invalid/text-after-array-entries.toml create mode 100644 third_party/rust/toml/tests/invalid/text-after-integer.toml create mode 100644 third_party/rust/toml/tests/invalid/text-after-string.toml create mode 100644 third_party/rust/toml/tests/invalid/text-after-table.toml create mode 100644 third_party/rust/toml/tests/invalid/text-before-array-separator.toml create mode 100644 third_party/rust/toml/tests/invalid/text-in-array.toml create mode 100644 third_party/rust/toml/tests/parser.rs create mode 100644 third_party/rust/toml/tests/pretty.rs create mode 100644 third_party/rust/toml/tests/serde.rs create mode 100644 third_party/rust/toml/tests/tables-last.rs create mode 100644 third_party/rust/toml/tests/valid.rs create mode 100644 third_party/rust/toml/tests/valid/array-empty.json create mode 100644 third_party/rust/toml/tests/valid/array-empty.toml create mode 100644 third_party/rust/toml/tests/valid/array-nospaces.json create mode 100644 third_party/rust/toml/tests/valid/array-nospaces.toml create mode 100644 third_party/rust/toml/tests/valid/arrays-hetergeneous.json create mode 100644 third_party/rust/toml/tests/valid/arrays-hetergeneous.toml create mode 100644 third_party/rust/toml/tests/valid/arrays-nested.json create mode 100644 third_party/rust/toml/tests/valid/arrays-nested.toml create mode 100644 third_party/rust/toml/tests/valid/arrays.json create mode 100644 third_party/rust/toml/tests/valid/arrays.toml create mode 100644 third_party/rust/toml/tests/valid/bool.json create mode 100644 third_party/rust/toml/tests/valid/bool.toml create mode 100644 third_party/rust/toml/tests/valid/comments-everywhere.json create mode 100644 third_party/rust/toml/tests/valid/comments-everywhere.toml create mode 100644 third_party/rust/toml/tests/valid/datetime-truncate.json create mode 100644 third_party/rust/toml/tests/valid/datetime-truncate.toml create mode 100644 third_party/rust/toml/tests/valid/datetime.json create mode 100644 third_party/rust/toml/tests/valid/datetime.toml create mode 100644 third_party/rust/toml/tests/valid/empty.json create mode 100644 third_party/rust/toml/tests/valid/empty.toml create mode 100644 third_party/rust/toml/tests/valid/example-bom.toml create mode 100644 third_party/rust/toml/tests/valid/example-v0.3.0.json create mode 100644 third_party/rust/toml/tests/valid/example-v0.3.0.toml create mode 100644 third_party/rust/toml/tests/valid/example-v0.4.0.json create mode 100644 third_party/rust/toml/tests/valid/example-v0.4.0.toml create mode 100644 third_party/rust/toml/tests/valid/example.json create mode 100644 third_party/rust/toml/tests/valid/example.toml create mode 100644 third_party/rust/toml/tests/valid/example2.json create mode 100644 third_party/rust/toml/tests/valid/example2.toml create mode 100644 third_party/rust/toml/tests/valid/float.json create mode 100644 third_party/rust/toml/tests/valid/float.toml create mode 100644 third_party/rust/toml/tests/valid/hard_example.json create mode 100644 third_party/rust/toml/tests/valid/hard_example.toml create mode 100644 third_party/rust/toml/tests/valid/implicit-and-explicit-after.json create mode 100644 third_party/rust/toml/tests/valid/implicit-and-explicit-after.toml create mode 100644 third_party/rust/toml/tests/valid/implicit-and-explicit-before.json create mode 100644 third_party/rust/toml/tests/valid/implicit-and-explicit-before.toml create mode 100644 third_party/rust/toml/tests/valid/implicit-groups.json create mode 100644 third_party/rust/toml/tests/valid/implicit-groups.toml create mode 100644 third_party/rust/toml/tests/valid/integer.json create mode 100644 third_party/rust/toml/tests/valid/integer.toml create mode 100644 third_party/rust/toml/tests/valid/key-equals-nospace.json create mode 100644 third_party/rust/toml/tests/valid/key-equals-nospace.toml create mode 100644 third_party/rust/toml/tests/valid/key-quote-newline.json create mode 100644 third_party/rust/toml/tests/valid/key-quote-newline.toml create mode 100644 third_party/rust/toml/tests/valid/key-space.json create mode 100644 third_party/rust/toml/tests/valid/key-space.toml create mode 100644 third_party/rust/toml/tests/valid/key-special-chars.json create mode 100644 third_party/rust/toml/tests/valid/key-special-chars.toml create mode 100644 third_party/rust/toml/tests/valid/key-with-pound.json create mode 100644 third_party/rust/toml/tests/valid/key-with-pound.toml create mode 100644 third_party/rust/toml/tests/valid/long-float.json create mode 100644 third_party/rust/toml/tests/valid/long-float.toml create mode 100644 third_party/rust/toml/tests/valid/long-integer.json create mode 100644 third_party/rust/toml/tests/valid/long-integer.toml create mode 100644 third_party/rust/toml/tests/valid/multiline-string.json create mode 100644 third_party/rust/toml/tests/valid/multiline-string.toml create mode 100644 third_party/rust/toml/tests/valid/raw-multiline-string.json create mode 100644 third_party/rust/toml/tests/valid/raw-multiline-string.toml create mode 100644 third_party/rust/toml/tests/valid/raw-string.json create mode 100644 third_party/rust/toml/tests/valid/raw-string.toml create mode 100644 third_party/rust/toml/tests/valid/string-empty.json create mode 100644 third_party/rust/toml/tests/valid/string-empty.toml create mode 100644 third_party/rust/toml/tests/valid/string-escapes.json create mode 100644 third_party/rust/toml/tests/valid/string-escapes.toml create mode 100644 third_party/rust/toml/tests/valid/string-simple.json create mode 100644 third_party/rust/toml/tests/valid/string-simple.toml create mode 100644 third_party/rust/toml/tests/valid/string-with-pound.json create mode 100644 third_party/rust/toml/tests/valid/string-with-pound.toml create mode 100644 third_party/rust/toml/tests/valid/table-array-implicit.json create mode 100644 third_party/rust/toml/tests/valid/table-array-implicit.toml create mode 100644 third_party/rust/toml/tests/valid/table-array-many.json create mode 100644 third_party/rust/toml/tests/valid/table-array-many.toml create mode 100644 third_party/rust/toml/tests/valid/table-array-nest-no-keys.json create mode 100644 third_party/rust/toml/tests/valid/table-array-nest-no-keys.toml create mode 100644 third_party/rust/toml/tests/valid/table-array-nest.json create mode 100644 third_party/rust/toml/tests/valid/table-array-nest.toml create mode 100644 third_party/rust/toml/tests/valid/table-array-one.json create mode 100644 third_party/rust/toml/tests/valid/table-array-one.toml create mode 100644 third_party/rust/toml/tests/valid/table-empty.json create mode 100644 third_party/rust/toml/tests/valid/table-empty.toml create mode 100644 third_party/rust/toml/tests/valid/table-multi-empty.json create mode 100644 third_party/rust/toml/tests/valid/table-multi-empty.toml create mode 100644 third_party/rust/toml/tests/valid/table-sub-empty.json create mode 100644 third_party/rust/toml/tests/valid/table-sub-empty.toml create mode 100644 third_party/rust/toml/tests/valid/table-whitespace.json create mode 100644 third_party/rust/toml/tests/valid/table-whitespace.toml create mode 100644 third_party/rust/toml/tests/valid/table-with-pound.json create mode 100644 third_party/rust/toml/tests/valid/table-with-pound.toml create mode 100644 third_party/rust/toml/tests/valid/unicode-escape.json create mode 100644 third_party/rust/toml/tests/valid/unicode-escape.toml create mode 100644 third_party/rust/toml/tests/valid/unicode-literal.json create mode 100644 third_party/rust/toml/tests/valid/unicode-literal.toml (limited to 'third_party/rust/toml') diff --git a/third_party/rust/toml/.cargo-checksum.json b/third_party/rust/toml/.cargo-checksum.json new file mode 100644 index 0000000000..abdb9689e8 --- /dev/null +++ b/third_party/rust/toml/.cargo-checksum.json @@ -0,0 +1 @@ +{"files":{"Cargo.toml":"e3606897c2303508e3091468afb2afd22828bb2fa971d91b522c9ddf4832f100","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"cdb1e357027407997a4666c3cb7d4db6676ef151289dbc49b1ab6df744e06047","examples/decode.rs":"91f5c35b94257f184d85183036a6d6d7aafbc22672b99446105b3cffdf3e7ff4","examples/toml2json.rs":"eaa9ad85ec19714f6437048ae28b844966225a17055d1a37878f41bcbc2c5e47","src/datetime.rs":"770bf5947748c8d563174dd8b4e4dee35fbd3171ea81c445c554d642c524f302","src/de.rs":"47a8e1ecee22068dc9d381f8ec05a47c644af49dbbb160fd3cb7a7b86d664adf","src/lib.rs":"d618368aac8d3ee5873eab36a3672cd88d72a121e26b5fd537cd3548293a1ff6","src/ser.rs":"11d8b67e9f84583d48c1a561c3c8e080b71be0ff479243ddbae28d5da797d261","src/tokens.rs":"ccc58d254a4a5666573fe42cf21b88621292c59858067169f102f2533cea9372","src/value.rs":"87a745d1eeba0ce4dc79451d0640d9a6145dec50dded1748e9a167719217be2a","tests/README.md":"3e7d07d64c34e117c3d862ee12e4947af8c133fb0b53f6f0de43cc3bfa5057b8","tests/backcompat.rs":"1d40b13ed379832d31c5d1ae35b9a3c9d9f66ab0ec40e7c16f46139d2fb4c35e","tests/datetime.rs":"c76e7f60514a748c56e09c369d888ea22d8e600b0200275da62dc8ad47ce9761","tests/display-tricky.rs":"e0ffa4f992ac1b3f6c88cf2dc299b605c6352ca3dcf18a4253fdb9b98ef410fd","tests/display.rs":"4472cf88c0ccc58d47b109570f8b19a218ac274ab5293df9e67db2db4f6e5945","tests/formatting.rs":"8941f2fe843d5294ef3dc7ff8aaa3db325d4ec368f1d138f8c28ab4e18c8261b","tests/invalid-encoder-misc.rs":"7a29c89dd664276cae8869d2394b0e7cf29f7a6d298cd8566fa1fd087dd635f4","tests/invalid-encoder/array-mixed-types-ints-and-floats.json":"206d2a353153efbcee74e7ee7b0f852e7a948cfb88417f74607b3ad6f020e373","tests/invalid-misc.rs":"70e14c859e67ed7e03ec426e5cb25a306a893cf85042e0be4fdbbc423b076887","tests/invalid.rs":"f6798f22652c2c09c23b066af33b402319399f7106ef5c9fda1a5222af522856","tests/invalid/array-mixed-types-arrays-and-ints.toml":"c1547b686357c7a865e333a7ce7eed1e30743ebc4daac8ea6148bdd84b7e4dc7","tests/invalid/array-mixed-types-ints-and-floats.toml":"baa235fc168869716680955fd5bdafab30b6fa9b3d09185086261a56ef12960e","tests/invalid/array-mixed-types-strings-and-ints.toml":"4440057ed90d4461db0be55cfd71299cad96b601d5faec2140666242f6fde147","tests/invalid/datetime-malformed-no-leads.toml":"1fa6bf72ea0b96be835ac031408f7acfd0b8d18d5f54b4c0fce8136aad27d22e","tests/invalid/datetime-malformed-no-secs.toml":"b9c30b7fa1847c80e381d68cc79834eefbb8813cd0eff465fb7cbe0733df429b","tests/invalid/datetime-malformed-no-t.toml":"490a46d2e707ef4f87987ec12a22afa5a71c97c5eaa0f4201a174c47846c6a4a","tests/invalid/datetime-malformed-with-milli.toml":"62bfd0a6645bcb3f78211523e5673a3d1fa726d9e942c1643df243d6fba474c8","tests/invalid/duplicate-key-table.toml":"a896ea2180d16fcdd4f6c30aa27529b5b29e7e195a4e7a9944343028783602e9","tests/invalid/duplicate-keys.toml":"4bb0a65c22e7704893a2a51334eb2518af702850ef59aeecd5226e7b26bc07ec","tests/invalid/duplicate-tables.toml":"23b16ce26e1155ee6bf1fff559701dce86475c6a2878536b61f6b7e68be340de","tests/invalid/empty-implicit-table.toml":"d6026110dc0dee7babd69592218819328caa425f48cc879e895b29e48550c06c","tests/invalid/empty-table.toml":"37517e5f3dc66819f61f5a7bb8ace1921282415f10551d2defa5c3eb0985b570","tests/invalid/float-no-leading-zero.toml":"159654461094c938574ba2d2d09baa3d3c387dd6ed024fd411530c0573a1ec42","tests/invalid/float-no-trailing-digits.toml":"64e4f336186cd096be2804532dbd694dd50ea551d292a9cdbf0bef2abf227101","tests/invalid/key-after-array.toml":"314af33770170b53bf2ec3be43ea1609d981c81d62c968052499b85ed54ccce8","tests/invalid/key-after-table.toml":"ed0dcf38f003d184dd18d1518702da0115cbfb05a5a28cbcf42de2f9bdee05fa","tests/invalid/key-empty.toml":"4303477abf4c0b920b42e96edd61caecf9c1f2d5d97f56af876854cd725aff3c","tests/invalid/key-hash.toml":"cd2a2eba6032d32c829633d3cd2778aeba81f5ff554e69f62af6557d1dc712f6","tests/invalid/key-newline.toml":"06a313a6bd70c2db6a1f5bda479d854d8f87e037e3cabf18fb5db822466ffcac","tests/invalid/key-open-bracket.toml":"52dea939022949290e3a19f1291d15605429344dce3cd1aa1f1568ecad8ca365","tests/invalid/key-single-open-bracket.toml":"245843abef9e72e7efac30138a994bf6301e7e1d7d7042a33d42e863d2638811","tests/invalid/key-space.toml":"b4e336d07c27fb3d0f0a6e50b733e1546202dfd58aaf2f7956f56fd6f075b0a1","tests/invalid/key-start-bracket.toml":"3bd3748a9df1d25ab2661330a3da187bd4da3958292bbf0e8b59d7963634dd87","tests/invalid/key-two-equals.toml":"3ac0c4e339d47c86e57564e43147b772ae83933b78083dc78d0ef77e231df3f1","tests/invalid/string-bad-byte-escape.toml":"c665dcec7c02f442c4fdc80423698eed2376ce65779cf855371772293bec2927","tests/invalid/string-bad-escape.toml":"eeca691fbba3d270f58ae2953d2d1369a773e619e39d8c11f38d6bf6f8472e82","tests/invalid/string-byte-escapes.toml":"4a4604b32971de3a252cd01d2997b450972c3ec9030cf22a070d49c57f050da4","tests/invalid/string-no-close.toml":"bb2eaf96eb9f83a52bd0772abb313060a06b94f650efeb45edce774622686882","tests/invalid/table-array-implicit.toml":"9b841ea64d68be4deb54f67fc807b05fd235452ee563ffa7de69dbca64b2f7dd","tests/invalid/table-array-malformed-bracket.toml":"164f641b2628bf04f8202d9746a360a4a243faca1408dc2ecd0c0fdd2d1c2c27","tests/invalid/table-array-malformed-empty.toml":"56ca2a15019cf5c3555041a191f983dc72b1678f0de0afd1a7b8f46ed7970420","tests/invalid/table-empty.toml":"37517e5f3dc66819f61f5a7bb8ace1921282415f10551d2defa5c3eb0985b570","tests/invalid/table-nested-brackets-close.toml":"991e1210f81e24abcd735988f0d960d4ee94d2ec3b133c6fea6e24932d91c507","tests/invalid/table-nested-brackets-open.toml":"8fb569fc90fa606ae94708ee2bf205bff8db8a023624b3e52ef6b2c1a98ba1c6","tests/invalid/table-whitespace.toml":"2c2db1259adc641df0459e896d349d3db60965d5368d5c8ed50aedd3bc88f040","tests/invalid/table-with-pound.toml":"d8070437f07bd115ac8006c61e286401bd3be88728a62264796e757121750ecd","tests/invalid/text-after-array-entries.toml":"2530cace13292313983b90b01d63e4b8ac484809e7ef0ac79904923573eda7ec","tests/invalid/text-after-integer.toml":"6168ed823a135b8914956b04307aeec2347b10eb1aa79008406d7b547cbde682","tests/invalid/text-after-string.toml":"1771987dd679e1cc181cf53406ba313fdc3413a081d17a93da6041bf6ccccf5e","tests/invalid/text-after-table.toml":"f27ae56bb0b42d3af4c813392857afdfeb4bf8ab77ff896cd93ba32cf1a21b26","tests/invalid/text-before-array-separator.toml":"192d28699573abbdc521797576d4885adf756336c3e76971f10270603c957464","tests/invalid/text-in-array.toml":"50d7b16d7a03d470f1a907eebfeb156d0c696e6f9a8c734a5e4caa2365f54654","tests/parser.rs":"6efa6a073adc041e1347fbaf30225359253a8f878ce328cdb74af3e83f60163e","tests/pretty.rs":"82b69142f0b438b0d76753d1a70ecb5c9d78df9f7c05a75e1be36eef11679960","tests/serde.rs":"94a119191110c4e57ef44f75022c0473fa1ffb9ed4242cd6320cbf96a7a3234a","tests/tables-last.rs":"593c60ea4727f08168a4a016ef876283d50f78888c5eab7d407092681712f912","tests/valid.rs":"ac398cac034eb7b6d320eb97b383a562e4924a22ef8d29fe43417ad95b17877d","tests/valid/array-empty.json":"4ed46e8aa3586a7ddd9097cda38919699860052f188880de18e12d4acbee5307","tests/valid/array-empty.toml":"769faa42a690b02ad1b573277f0d793a4a38a7ecf30b9db67bf9836fe2b7778c","tests/valid/array-nospaces.json":"7c82b474797871488c2b522e9b852772a78c681a86900f780f7a0be4f901e1ec","tests/valid/array-nospaces.toml":"01fba63551b1051f7e117c9551c488b293bd3cd4745cbeec6b3709c32f2a3a64","tests/valid/arrays-hetergeneous.json":"dac4702412c90d5ddd6b898c3657c71d782d0aca46e5b9ca19cc694d3e226c0f","tests/valid/arrays-hetergeneous.toml":"361ae2e8470b47b12b336eb61eedd09abb20e216fbeb582b46d16a2831adda4d","tests/valid/arrays-nested.json":"34d6f8fd770f0728f38dbf0d686bed2c218bc16da978290c0208d3bf3704bdec","tests/valid/arrays-nested.toml":"a5941a01a2ba2fa179a3885039a5f81ca6c9876b2e8bea7b880563238be9f004","tests/valid/arrays.json":"315fff195a7d4c80e867e1f14c12a23e36dcc666e8de36138249b15e99bdd4dd","tests/valid/arrays.toml":"2d3c91b77d4f6a65a6a5a2c5ad521dbe86cc2f0ff389dfe58e8c34275cdc35c7","tests/valid/bool.json":"bb608b912fe4d89cb2186da957c10951780575bb34b2f43305335c745eff049c","tests/valid/bool.toml":"3c06ad4dce7430326f5f867105b2e9382def90cccb3ecb69f657c0b88974ab04","tests/valid/comments-everywhere.json":"800f8efd86d1bab4f91f0e367da52a2465e1480387df892561ed8948fd1a38c3","tests/valid/comments-everywhere.toml":"8636108c34f50d45244b142d342234b7535e01fba2db2d2ffed3430223009cea","tests/valid/datetime-truncate.json":"5ca5dbb56bb00c4cfc4c10aeb5607160284593bad3bf6dc988425a4f1f53dfbc","tests/valid/datetime-truncate.toml":"55ee01485f3e537fb6b2d3977f656c11543e53adb4e79c6fa8f2a953183c0f7f","tests/valid/datetime.json":"94f130c3b2a5f30c625a3a3168b9dfe52aa109b470c4e077f352b3dd79382a69","tests/valid/datetime.toml":"4e1b71ba31a1feef80a1e436225aa9c5d291bf780f558e7cfa76998fe2a29e08","tests/valid/empty.json":"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356","tests/valid/empty.toml":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","tests/valid/example-bom.toml":"50f3607be97de2f894ccd41a29d3a8a1b1f430982e5ab5bf43047874837f6a42","tests/valid/example-v0.3.0.json":"ec02332eb59dab93a50560771e4b01b972a29d93b6dca8954728c0631e1799a0","tests/valid/example-v0.3.0.toml":"aba9349588c1ba6af2a3ad0c1db2c3d311dca66b64f654480340a0823dfd4546","tests/valid/example-v0.4.0.json":"8b967b246ca2383172eaaecf790b2115a18020f63c70d0848d1dc25fc1fed5a9","tests/valid/example-v0.4.0.toml":"47ee4c4cd83637cd09aca6518f88c8ed56acc2b3022e5ea53d9121e5d35335ed","tests/valid/example.json":"c57fabb1be0ae7ed140fe7ae5082051571c85180204b8ae8d8da1e86133278c9","tests/valid/example.toml":"6f02b2a52ea63c70b629e41e06a8eb1eb4aab359ab966a7a397b248e13849c9c","tests/valid/example2.json":"de89432e78f0a074aae54650fedf151ceca3b0ccb148b8a66e18e2ed68024ba2","tests/valid/example2.toml":"c389eeb485fb7cb9445d617a9a0f8ba70049f08d66cf6b6f2a9a986574295de1","tests/valid/float.json":"9676c13fef00a01bc729456bfe27f1b24a1bd059c9a5913bb0b0401e976a0aab","tests/valid/float.toml":"b6784f554aa38bb210f0905c3bafdfae6db723a4f53288fb07febc66451bbc2d","tests/valid/hard_example.json":"8d170e73e156b8b6be559246880e9cb6a79b36f63d14bc97e3bdf2f2091e7a17","tests/valid/hard_example.toml":"cd3b89f8917a44f944b12fe47f69f86bb39f17db85d1a081bf0c134831eb90f9","tests/valid/implicit-and-explicit-after.json":"6dcaeaf8ee3479bf2cd5c14eb58970757175aaefab014bce9acb0b85e7bf9dd0","tests/valid/implicit-and-explicit-after.toml":"0599b16822764cdb1c3d3cf53f71186b97afc9f60f8d58358a4a89fe4d9477c3","tests/valid/implicit-and-explicit-before.json":"6dcaeaf8ee3479bf2cd5c14eb58970757175aaefab014bce9acb0b85e7bf9dd0","tests/valid/implicit-and-explicit-before.toml":"33435dddb68144b652ca5f5e0c4c53e4f7b3ca0166f9b944eda55f8d76ed2871","tests/valid/implicit-groups.json":"fc2bb43ec20c8c9148c8a70490b3a054506932c41687222ea11faae47eafb723","tests/valid/implicit-groups.toml":"248b3e8272ec43ce4af872981acde10628eeae73537ed6763a1f4245f5a9610c","tests/valid/integer.json":"0fc2d0cb1fb46d7805c1007b1fa4c46a65b273e56ae9d751df686e81d3a3354f","tests/valid/integer.toml":"74b964eb9561be6aa7266f6034cee1cd0657bdab8043a5ec9da33d9b184345da","tests/valid/key-equals-nospace.json":"b9878ee3585d1b48710a4bc09f2163b910ea71a2bfdaa8f1da68e599e8b30f47","tests/valid/key-equals-nospace.toml":"24cab0d01b67b184d0a737de3a5b5d47b8b69b36203273296d5ef763f7fdcf68","tests/valid/key-quote-newline.json":"dc077cc852761ffbab2cb23486c023dae2e07410c76fcb507a40d96ed8922e06","tests/valid/key-quote-newline.toml":"a224611bfce786f7d04a3a6abda62fdff79bc6fd2cb94263334d135d46e0143b","tests/valid/key-space.json":"30be539b01420be5cedc9078b88c3279bbef7c0bdde36ba8249ed8906112d5c7","tests/valid/key-space.toml":"9e9459b8cfebc404cf93d77c2d4082cadcd57165a2f9ce9cb35d1d12dc94a8c0","tests/valid/key-special-chars.json":"8bbebb20660d93efa73707bdb09e87a43c2b31c18f13df6388c701a1bc7cab8c","tests/valid/key-special-chars.toml":"c6cb0ba12d32f03cda4206097a1edb27cd154215d72e1c5791cc4f8dff2270b3","tests/valid/key-with-pound.json":"ea4dd79d0ad2a824bcce5c4c194d7fae82a7584a2ab7c0d83d6ddaae6130973e","tests/valid/key-with-pound.toml":"c334f676e19c01b96111277248654358cc8222fd0639aecaf429407e63b6a2dc","tests/valid/long-float.json":"7e103f56e490aa1b1fe5a762000ceb1f8c599f7d81aa215c90f5da41ab4ba6db","tests/valid/long-float.toml":"4d23f706f2a0d241840f6ea78657820c9c7b904c0c3c16828f8cc2574d7c8761","tests/valid/long-integer.json":"9ed7976639f0c2cd7f112584e2f5d272e92569be7135ea5bb9ba597abaff0767","tests/valid/long-integer.toml":"309f94be7ff5fd6f6dedbd257a1e6c171cb71aa74409ff3f8babda951f89d687","tests/valid/multiline-string.json":"3d67a8b992b85e9a2e58b77a1b76dc29745a9c2b4a362ad517786fed541948d7","tests/valid/multiline-string.toml":"7d6650009eb31a03d5b40b20712ef0157e9b787d9c966e66c38873a34e3b861c","tests/valid/raw-multiline-string.json":"4c95e34497433168cac25eb4132485c3bd13c35cad9d13d7becf7f90469dacca","tests/valid/raw-multiline-string.toml":"c724151024ccde432e0ec0d4ba60a5320d77841008116324c39516b8cbb94f4d","tests/valid/raw-string.json":"19268797aff8dfa28437d6ed8f9d813035f6eee50aade5fc774ba12b3290216b","tests/valid/raw-string.toml":"16510e05d477a0856ebaf38cacd0e9e18f02ab63ac7bd1a2eabbaa47a54d0e49","tests/valid/string-empty.json":"ece7d01326742a46e37d6404175118c0a91a2494f7ba2290bbc1d6f990ddb65b","tests/valid/string-empty.toml":"251e9e4052ede79f6b2462e71f73e0b7c9f5927484f6f77f0cd8b3c839b0c13b","tests/valid/string-escapes.json":"3d516f03cf94d5b5ee6b0887b8d37fdf21152752f049f5922a24adaacb5b8c35","tests/valid/string-escapes.toml":"86b1569e10fec91301709ad747012f0f42395050a2343b42aca450e001120f7a","tests/valid/string-simple.json":"622676e347676cce9f9733210acbd8056ce77a0588772ffd6efb05bb4e81b571","tests/valid/string-simple.toml":"ae74db09acea3be2ccae7f854f7b6f7c874ace9d4d87bf2f437b059a7d38a464","tests/valid/string-with-pound.json":"458a0add71536c1df5e1ed3ee5483c6eb48578abce0b0ebcdf75ea20d41ed6f4","tests/valid/string-with-pound.toml":"1aee397830d9ad2a93d41ee9c435acdbfef3758d1bb7c48bca7424fbbec89466","tests/valid/table-array-implicit.json":"3f7d3cdb468de67bc183162805d9c753ef5772f6f363ac2a26598387a5d991ea","tests/valid/table-array-implicit.toml":"66bcb030899a95e9a25ec44b7c9291b02f80ecbc324061cf1cd93223a2919f21","tests/valid/table-array-many.json":"3f21243eeb71ca3e5657a43559c806e12e3833e9f74c43c0c12aad9b0c853e4c","tests/valid/table-array-many.toml":"8d8ea546f954a81ca149a02147ae5f4bf075151cfcd530e62dcf05a04d843ffb","tests/valid/table-array-nest-no-keys.json":"a93ed1e96a8c52848e65a2f79c0e5c0627fbc62bd5f3e2557fdd0d42c303e7da","tests/valid/table-array-nest-no-keys.toml":"9cfcd72b7d166b4ae77a7be456017f749f375ad562475802e22dc1a57b503dc7","tests/valid/table-array-nest.json":"0a987d2bf1d5bc85f5c9433f23d389063600682a68538b6e57938a3c572959e4","tests/valid/table-array-nest.toml":"71b9c753bf773f232ac71cb2469a54ee0110ff137829045421edd7c5a64d6b6a","tests/valid/table-array-one.json":"7dc0ea3f7f843f7dc7443e68af43a1e5130a5fbae8a27fb02d8d92fa2487888e","tests/valid/table-array-one.toml":"4c478aea2dd7dfcfda682503b49e610f0fa4ce85a3b3cd0bc9041d4959e3626a","tests/valid/table-empty.json":"11e43e212d87b3b2547a5f2541f4091a3d2f6ba00b2a2004b07e02734e927ea7","tests/valid/table-empty.toml":"24d4941e67d5965d270eaebdb9816b994311e0f2f0e79ef6bb626f362c52842e","tests/valid/table-multi-empty.json":"3a2c82201a0447304afb23fb48ee961b4bd812fca3e1b061cc033e7e2bfb976c","tests/valid/table-multi-empty.toml":"886c9c4cc2d691816ed3fa404cb9d362b0511eb8c389a71419a858abb26f83df","tests/valid/table-sub-empty.json":"85cca6d48a5993c4f207c21ed96652af4f50b6936b0807659c75317c1763b6db","tests/valid/table-sub-empty.toml":"ae92e90a806ffefcbf8cda83cb82acf7448f75efa50dcfb5e2384632d36471b3","tests/valid/table-whitespace.json":"ad84ac49a6d13f7c4a8af0e1e71fd7ff2a446aa16a34c21a809a0850dfa76e73","tests/valid/table-whitespace.toml":"2f15dafb263d2771671db299f6202b4b78d293aec1ded7641ec7eb1cb024b52c","tests/valid/table-with-pound.json":"151e76606efe77500cbb0aa8fcf8ccfadb124d533bb79a9caa62e937b826e676","tests/valid/table-with-pound.toml":"a1f86c2e3789cc89500ec1d5eac2ec0bdb94bf445fddc3cab558b5228f3aba56","tests/valid/unicode-escape.json":"ddfc662f25712f1ebfc7b93b839405dfca56fc43dcde3276ad8b1ea9fdcdcc4d","tests/valid/unicode-escape.toml":"d12be96b9316b2092026be060e0008cb67a81472dccd9eab7914c7252a840608","tests/valid/unicode-literal.json":"1dd42756384b954955815dc3e906db64b4cd2c0c094f9b3c86633d1652d6d79d","tests/valid/unicode-literal.toml":"bffc6c3d4757de31d0cbfd7b8dc591edd2910fe8a4e1c46bbee422dddc841003"},"package":"a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e"} \ No newline at end of file diff --git a/third_party/rust/toml/Cargo.toml b/third_party/rust/toml/Cargo.toml new file mode 100644 index 0000000000..da921ce456 --- /dev/null +++ b/third_party/rust/toml/Cargo.toml @@ -0,0 +1,33 @@ +# 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 = "toml" +version = "0.4.5" +authors = ["Alex Crichton "] +description = "A native Rust encoder and decoder of TOML-formatted files and streams. Provides\nimplementations of the standard Serialize/Deserialize traits for TOML data to\nfacilitate deserializing and serializing Rust structures.\n" +homepage = "https://github.com/alexcrichton/toml-rs" +documentation = "https://docs.rs/toml" +readme = "README.md" +keywords = ["encoding"] +categories = ["config", "encoding", "parser-implementations"] +license = "MIT/Apache-2.0" +repository = "https://github.com/alexcrichton/toml-rs" +[dependencies.serde] +version = "1.0" +[dev-dependencies.serde_derive] +version = "1.0" + +[dev-dependencies.serde_json] +version = "1.0" +[badges.travis-ci] +repository = "alexcrichton/toml-rs" diff --git a/third_party/rust/toml/LICENSE-APACHE b/third_party/rust/toml/LICENSE-APACHE new file mode 100644 index 0000000000..16fe87b06e --- /dev/null +++ b/third_party/rust/toml/LICENSE-APACHE @@ -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 [yyyy] [name of copyright owner] + +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. diff --git a/third_party/rust/toml/LICENSE-MIT b/third_party/rust/toml/LICENSE-MIT new file mode 100644 index 0000000000..39e0ed6602 --- /dev/null +++ b/third_party/rust/toml/LICENSE-MIT @@ -0,0 +1,25 @@ +Copyright (c) 2014 Alex Crichton + +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. diff --git a/third_party/rust/toml/README.md b/third_party/rust/toml/README.md new file mode 100644 index 0000000000..47bb8bb5ac --- /dev/null +++ b/third_party/rust/toml/README.md @@ -0,0 +1,31 @@ +# toml-rs + +[![Build Status](https://travis-ci.org/alexcrichton/toml-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/toml-rs) +[![Coverage Status](https://coveralls.io/repos/alexcrichton/toml-rs/badge.svg?branch=master&service=github)](https://coveralls.io/github/alexcrichton/toml-rs?branch=master) +[![Latest Version](https://img.shields.io/crates/v/toml.svg)](https://crates.io/crates/toml) +[![Documentation](https://docs.rs/toml/badge.svg)](https://docs.rs/toml) + +A [TOML][toml] decoder and encoder for Rust. This library is currently compliant +with the v0.4.0 version of TOML. This library will also likely continue to stay +up to date with the TOML specification as changes happen. + +[toml]: https://github.com/toml-lang/toml + +```toml +# Cargo.toml +[dependencies] +toml = "0.4" +``` + +This crate also supports serialization/deserialization through the +[serde](https://serde.rs) crate on crates.io. Currently the older `rustc-serialize` +crate is not supported in the 0.3+ series of the `toml` crate, but 0.2 can be +used for that support. + +# License + +`toml-rs` 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. diff --git a/third_party/rust/toml/examples/decode.rs b/third_party/rust/toml/examples/decode.rs new file mode 100644 index 0000000000..e15da79a68 --- /dev/null +++ b/third_party/rust/toml/examples/decode.rs @@ -0,0 +1,56 @@ +//! An example showing off the usage of `Deserialize` to automatically decode +//! TOML into a Rust `struct` + +#![deny(warnings)] + +extern crate toml; +extern crate serde; +#[macro_use] +extern crate serde_derive; + +/// This is what we're going to decode into. Each field is optional, meaning +/// that it doesn't have to be present in TOML. +#[derive(Debug, Deserialize)] +struct Config { + global_string: Option, + global_integer: Option, + server: Option, + peers: Option>, +} + +/// Sub-structs are decoded from tables, so this will decode from the `[server]` +/// table. +/// +/// Again, each field is optional, meaning they don't have to be present. +#[derive(Debug, Deserialize)] +struct ServerConfig { + ip: Option, + port: Option, +} + +#[derive(Debug, Deserialize)] +struct PeerConfig { + ip: Option, + port: Option, +} + +fn main() { + let toml_str = r#" + global_string = "test" + global_integer = 5 + + [server] + ip = "127.0.0.1" + port = 80 + + [[peers]] + ip = "127.0.0.1" + port = 8080 + + [[peers]] + ip = "127.0.0.1" + "#; + + let decoded: Config = toml::from_str(toml_str).unwrap(); + println!("{:#?}", decoded); +} diff --git a/third_party/rust/toml/examples/toml2json.rs b/third_party/rust/toml/examples/toml2json.rs new file mode 100644 index 0000000000..1ed441a93a --- /dev/null +++ b/third_party/rust/toml/examples/toml2json.rs @@ -0,0 +1,51 @@ +#![deny(warnings)] + +extern crate toml; +extern crate serde_json; + +use std::fs::File; +use std::env; +use std::io; +use std::io::prelude::*; + +use toml::Value as Toml; +use serde_json::Value as Json; + +fn main() { + let mut args = env::args(); + let mut input = String::new(); + if args.len() > 1 { + let name = args.nth(1).unwrap(); + File::open(&name).and_then(|mut f| { + f.read_to_string(&mut input) + }).unwrap(); + } else { + io::stdin().read_to_string(&mut input).unwrap(); + } + + match input.parse() { + Ok(toml) => { + let json = convert(toml); + println!("{}", serde_json::to_string_pretty(&json).unwrap()); + } + Err(error) => println!("failed to parse TOML: {}", error), + } +} + +fn convert(toml: Toml) -> Json { + match toml { + Toml::String(s) => Json::String(s), + Toml::Integer(i) => Json::Number(i.into()), + Toml::Float(f) => { + let n = serde_json::Number::from_f64(f) + .expect("float infinite and nan not allowed"); + Json::Number(n) + } + Toml::Boolean(b) => Json::Bool(b), + Toml::Array(arr) => Json::Array(arr.into_iter().map(convert).collect()), + Toml::Table(table) => Json::Object(table.into_iter().map(|(k, v)| { + (k, convert(v)) + }).collect()), + Toml::Datetime(dt) => Json::String(dt.to_string()), + } +} diff --git a/third_party/rust/toml/src/datetime.rs b/third_party/rust/toml/src/datetime.rs new file mode 100644 index 0000000000..83b5c0bb9c --- /dev/null +++ b/third_party/rust/toml/src/datetime.rs @@ -0,0 +1,425 @@ +use std::fmt; +use std::str::{self, FromStr}; +use std::error; + +use serde::{de, ser}; + +/// A parsed TOML datetime value +/// +/// This structure is intended to represent the datetime primitive type that can +/// be encoded into TOML documents. This type is a parsed version that contains +/// all metadata internally. +/// +/// Currently this type is intentionally conservative and only supports +/// `to_string` as an accessor. Over time though it's intended that it'll grow +/// more support! +/// +/// Note that if you're using `Deserialize` to deserialize a TOML document, you +/// can use this as a placeholder for where you're expecting a datetime to be +/// specified. +/// +/// Also note though that while this type implements `Serialize` and +/// `Deserialize` it's only recommended to use this type with the TOML format, +/// otherwise encoded in other formats it may look a little odd. +#[derive(PartialEq, Clone)] +pub struct Datetime { + date: Option, + time: Option