Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow floats to be deserialized from ints in tagged unions, part 2 #1

Closed
wants to merge 2,574 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2574 commits
Select commit Hold shift + click to select a range
cd365de
Update ui tests to nightly-2019-12-18
dtolnay Dec 18, 2019
895eb2b
Update ui tests to nightly-2019-12-19
dtolnay Dec 19, 2019
dfa321a
Ignore wildcard_in_or_patterns lint
dtolnay Jan 15, 2020
2a35101
remove the tiny bit of unsafe code
Jan 17, 2020
fc43def
Merge pull request #1721 from WildCryptoFox/remove-unsafe-code
dtolnay Jan 17, 2020
137ab48
Suppress unseparated_literal_suffix lint
dtolnay Jan 18, 2020
dbf1f9a
Remove unneeded type ascription
dtolnay Jan 18, 2020
cb1632e
Fix unused_parens lint
dtolnay Jan 25, 2020
a61cd0f
Update ui tests to nightly-2020-02-08
dtolnay Feb 8, 2020
142955b
Ignore struct_excessive_bools pedantic lint
dtolnay Feb 13, 2020
27c283a
Suppress wildcard import pedantic lints
dtolnay Feb 27, 2020
1894cb7
Resolve clippy question_mark lint
dtolnay Mar 6, 2020
078e88b
Select a single docs.rs build target
dtolnay Mar 17, 2020
ec6ca6b
Allow non-std Cow borrows
maciejhirsz Mar 18, 2020
c33fb95
Merge pull request #1754 from maciejhirsz/non-std-cow-borrow
dtolnay Mar 18, 2020
69653a7
Release 1.0.105
dtolnay Mar 18, 2020
e2ada0e
Simplify default Serializer::collect_str implementation
dtolnay Mar 28, 2020
2a9971a
Merge pull request #1764 from serde-rs/collect
dtolnay Mar 28, 2020
a135199
Hide generated dummy const in rustdoc
robo9k Apr 3, 2020
645f672
Merge pull request #1768 from robo9k/dummy-const-hidden-doc
dtolnay Apr 3, 2020
d156452
Release 1.0.106
dtolnay Apr 3, 2020
1b35c9e
Update serde_derive to tool attrs
dtolnay Apr 6, 2020
b6def53
Resolve redundant_field_names lint in serde_derive
dtolnay Apr 6, 2020
0bab6be
Resolve redundant_pattern_matching lint
dtolnay Apr 20, 2020
03addba
Format with rustfmt 2020-03-11
dtolnay Apr 20, 2020
0c4ffad
Run clippy on latest nightly that has clippy
dtolnay Apr 23, 2020
29be721
Work around clippy redundant_field_names bug
dtolnay Apr 23, 2020
6052293
Remove CI badge from Cargo.toml
dtolnay May 2, 2020
5534bf4
Enable GitHub Actions
dtolnay May 3, 2020
2b43557
Merge pull request #1795 from serde-rs/actions
dtolnay May 3, 2020
cd836eb
Try caching Cargo index to speed up 1.13 build
dtolnay May 3, 2020
112f204
Remove Travis configuration
dtolnay May 5, 2020
8b52ddd
Add GitHub Actions workflow to run Clippy
dtolnay May 5, 2020
e16e924
Split test suite to its own Actions job
dtolnay May 5, 2020
f369707
Update build status badge to GitHub Actions
dtolnay May 5, 2020
02631ce
Remove clippy from main CI workflow
dtolnay May 6, 2020
38ad09a
Add Windows CI in GitHub Actions
dtolnay May 5, 2020
59104bb
Remove AppVeyor configuration
dtolnay May 5, 2020
65dfa60
Update to rustversion 1.0
dtolnay May 6, 2020
732544a
Update to macrotest 1.0
dtolnay May 6, 2020
19a1123
Regenerate macrotest *.expanded.rs files
dtolnay May 6, 2020
e2ff603
Add Actions job to run macrotest
dtolnay May 6, 2020
23db3a4
Run expansion tests only if rustfmt is present
dtolnay May 6, 2020
115c1b4
Exclude expansion tests from test suite by default
dtolnay May 6, 2020
c120c45
Move clippy to ci.yml gated with github.event_name != 'pull_request'
dtolnay May 6, 2020
099fa25
Fix unused matrix component in name of clippy job
dtolnay May 6, 2020
f44402e
Add regression test for issue 1804
dtolnay May 8, 2020
63809e6
Fix indexing bug when `skip` and `other` are combined
dtolnay May 8, 2020
36a6687
Merge pull request #1805 from dtolnay/skip
dtolnay May 8, 2020
f63acb5
Release 1.0.107
dtolnay May 8, 2020
726ff5e
impl Serializer for &mut fmt::Formatter
Jan 3, 2020
99bc52f
Support no-default-features mode in Formatter's impl
dtolnay May 10, 2020
6182ece
Move the Formatter Serializer to a module
dtolnay May 10, 2020
16bf987
Remove serialize_unit from Formatter's impl
dtolnay May 10, 2020
850a29b
Directly display to the Formatter
dtolnay May 10, 2020
35ad468
Allow serializing newtype struct to Formatter
dtolnay May 10, 2020
1b8ebf6
Add 128-bit integer support for Formatter
dtolnay May 10, 2020
b7cfe33
Add example usage to Formatter Serializer impl
dtolnay May 10, 2020
ea2789d
Release 1.0.108
dtolnay May 10, 2020
a81968a
Turn panic to error in SystemTime serialization
Jan 2, 2020
3c97e1b
Format PR 1702 with rustfmt
dtolnay May 10, 2020
172edc4
Allow optional content field for adjacently tagged newtype variants
yhtez May 10, 2020
9476838
Omit missing content fallthrough arm if not needed
dtolnay May 10, 2020
9433004
Omit missing content match if not needed
dtolnay May 10, 2020
b97a183
Release 1.0.109
dtolnay May 10, 2020
dda070f
Fix borrow error on pre-NLL compilers
dtolnay May 10, 2020
4d6d0ae
Add a CI builder on 1.31.0
dtolnay May 10, 2020
d6b39fd
Merge pull request #1807 from dtolnay/31
dtolnay May 10, 2020
9f47c47
Add support for packed structs.
05storm26 May 1, 2020
c211449
Add test of Serialize impl for packed struct
dtolnay May 10, 2020
1fe3904
Simplify access of packed struct fields in derived Serialize impls
dtolnay May 10, 2020
548eb8f
Format PR 1791 with rustfmt
dtolnay May 10, 2020
da8d6f6
Simplify finding of repr(packed) attributes
dtolnay May 10, 2020
078b171
Release 1.0.110
dtolnay May 10, 2020
3167f98
Update 'Getting help' section
dtolnay May 10, 2020
afd51ef
Merge pull request #1808 from dtolnay/help
dtolnay May 10, 2020
c20730e
Remove reference to mozilla irc
dtolnay May 16, 2020
9d12515
Mirror 'Getting help' from github readme to crates.io readme
dtolnay May 16, 2020
ef6ed1d
Copy some new links from serde.rs to the crate-level doc
dtolnay May 22, 2020
31fe82a
Resolve match_wildcard_for_single_variants pedantic lint
dtolnay May 30, 2020
f7d06ca
Add failing test involving macro_rules metavariable
dtolnay May 30, 2020
c45a809
Look inside of None-delimited groups when examining types
dtolnay May 30, 2020
ef16c81
Merge pull request #1821 from dtolnay/ungroup
dtolnay May 30, 2020
9f331cc
Release 1.0.111
dtolnay May 30, 2020
0856a2c
No need to specify Cargo.toml in package.include
dtolnay Jun 10, 2020
95b1a5d
Ignore unnested_or_patterns suggesting unstable code
dtolnay Jun 11, 2020
97962d5
Forward serialize_entry on flattened maps
dtolnay Jun 14, 2020
e8fd2c8
Merge pull request #1839 from dtolnay/entry
dtolnay Jun 14, 2020
f3520e5
Release 1.0.112
dtolnay Jun 14, 2020
bb1dedf
Add FlexBuffers to serde ecosystem list
rw Jun 16, 2020
6980727
Merge pull request #1840 from rw/patch-1
dtolnay Jun 19, 2020
a50e1c2
Use underscore consts on Rust 1.37+
taiki-e Jun 7, 2020
b3ff7e4
Merge pull request #1827 from taiki-e/underscore_consts
dtolnay Jun 19, 2020
7351e0e
Link to feature announcements where available
dtolnay Jun 19, 2020
7350b58
Release 1.0.113
dtolnay Jun 19, 2020
6b3777b
Remove len hint specialization
dtolnay Jun 21, 2020
8ff11dc
Merge pull request #1841 from dtolnay/lenhint
dtolnay Jun 21, 2020
d5e6436
Add tests validating Serialize derivation for packed structs.
TannerRogalsky May 17, 2020
1cd10a7
Improved packed repr matching.
TannerRogalsky May 17, 2020
7e5701a
add alignment specific packed repr tests
TannerRogalsky May 19, 2020
04faac9
Remove error_on_line_overflow rustfmt setting
dtolnay Jun 21, 2020
a9f8ea0
Simplify search for packed repr attr
dtolnay Jun 22, 2020
9c6f0c3
Release 1.0.114
dtolnay Jun 22, 2020
010444d
Allow floats to be deserialized from ints in tagged unions
Mar 6, 2020
764ebd9
Suppress mixed_script_confusables in test suite
dtolnay Jun 27, 2020
c619b2a
Suppress unknown_lints warning in test suite
dtolnay Jun 27, 2020
29c5a50
Suppress unused_attributes warning in test suite
dtolnay Jun 27, 2020
24e6acb
Drop 'help or discussion' issue template
dtolnay Jul 5, 2020
9e140a2
Tweak yaml format blurb
dtolnay Jul 6, 2020
3022064
Suppress option_if_let_else clippy pedantic lint
dtolnay Jul 15, 2020
f8787c3
Suppress match_like_matches_macro clippy lint
dtolnay Jul 15, 2020
53b9871
Quote no longer requires high recursion
dtolnay Jul 16, 2020
26186bd
Add test for flattened unit
dtolnay Aug 10, 2020
ba07075
Support serializing flattened unit
dtolnay Aug 10, 2020
bf76f50
Support deserializing flattened unit
dtolnay Aug 10, 2020
e6f086d
Merge pull request #1874 from dtolnay/flatunit
dtolnay Aug 10, 2020
2ef60b6
Release 1.0.115
dtolnay Aug 10, 2020
2b5b159
Rename TyOverby/bincode to servo/bincode
dtolnay Aug 28, 2020
7ea7c2c
Merge pull request #1882 from dtolnay/bincode
dtolnay Aug 28, 2020
e5b3507
Replace serde_urlencoded link with serde_qs
dtolnay Sep 5, 2020
d35de19
Merge pull request #1885 from dtolnay/qs
dtolnay Sep 5, 2020
2e76f70
Update code of conduct link
dtolnay Sep 5, 2020
45c45e8
Fix hand-written enum variant deserializations to allow u64 discriminant
joshtriplett Sep 11, 2020
a5490e2
Merge pull request #1888 from joshtriplett/fix-enum-deserialization-u64
dtolnay Sep 11, 2020
b539cb4
Release 1.0.116
dtolnay Sep 11, 2020
be7d0e7
Ignore map_err_ignore Clippy pedantic lint
dtolnay Sep 26, 2020
2e821ea
Make impl IntoDeserializer for &[u8] public
Mingun Oct 3, 2020
db3074a
Implement IntoDeserializer for Cow<[u8]>
Mingun Oct 4, 2020
2b50409
Include room for SocketAddrV6 to serialize scope id
dtolnay Oct 3, 2020
e6d2322
Fix misprint in the error message
Mingun Oct 11, 2020
4bec9ff
Merge pull request #1906 from Mingun/fix-misprint
dtolnay Oct 11, 2020
fc3f104
Release 1.0.117
dtolnay Oct 15, 2020
8084258
Update ui tests to nightly-2020-10-20
dtolnay Oct 21, 2020
f6eb34a
Assert that numeric field identifiers correctly deserialized (now fai…
Mingun Oct 22, 2020
34de1e0
Implement IdentifierDeserializer for u64 instead of u32 because all i…
Mingun Oct 22, 2020
0737474
Allow field identifiers be any numbers if `#[serde(other)]` is used
Mingun Oct 22, 2020
e805717
Allow borrowed and owned strings and bytes and u8, u16, u64 for varia…
Mingun Oct 22, 2020
23c14e5
Allow to run assert_de_tokens_error on token sequence that is not exp…
Mingun Oct 22, 2020
104ad9a
Allow to define custom expectation message for type with `#[serde(exp…
Mingun Oct 22, 2020
42fa794
Make `BytesDeserializer` public
Mingun Oct 3, 2020
094f63b
Introduce a forward_deserializer macro.
Mingun Oct 23, 2020
9e1f573
Use forward_deserializer macro for define StrDeserializer for Identif…
Mingun Oct 23, 2020
7a7a182
Allow borrow for field identifiers
Mingun Oct 23, 2020
a227a87
Collect lifetimes inside macro invocations
taiki-e Jun 7, 2020
920a77a
Fix incorrect messages in serialized tokens assertions
Mingun Oct 27, 2020
97c350a
Forward Readable|Compact next_entry_seed to underlying next_entry_see…
Mingun Oct 27, 2020
0d5b6c1
Resolve ptr_eq clippy lint
dtolnay Oct 28, 2020
0e1c409
Suppress new result_unit_err clippy lint
dtolnay Oct 28, 2020
5cbc843
Show correct location in error messages by tracking caller of utility…
Mingun Oct 28, 2020
e3d871f
Opt in to experimental trybuild diffs
dtolnay Oct 31, 2020
ede40bd
Allow serializing of Wrapping without std
attente Nov 24, 2020
192c781
Format with rustfmt 1.4.25-beta
dtolnay Nov 29, 2020
8472192
Resolve clippy items_after_statements lint
dtolnay Nov 29, 2020
4a335f8
Merge pull request #1926 from attente/core-num-wrapping
dtolnay Dec 5, 2020
e797431
Release 1.0.118
dtolnay Dec 5, 2020
a5da27e
Add serde_dynamo to the list of data formats
bryanburgers Dec 21, 2020
3c29a88
Merge pull request #1936 from bryanburgers/add-serde-dynamo
dtolnay Dec 21, 2020
3c9fa1c
Switch to short form for serde.rs link in rustdoc
dtolnay Dec 21, 2020
8847800
Ignore from_over_into clippy lint in test suite
dtolnay Jan 4, 2021
91bfa8f
Refresh expandtest files with most recent rustfmt
dtolnay Jan 9, 2021
dd1f4b4
Make it clearer that the private implementation details are private
dtolnay Jan 9, 2021
b0c99ed
Restore compatibility with rustc 1.13.0
dtolnay Jan 9, 2021
4c89cf8
Release 1.0.119
dtolnay Jan 11, 2021
99d9151
refactor: Merge multiple FromStr visitors to a single FromStrVisitor
Jan 12, 2021
391d3ab
Touch up PR 1948
dtolnay Jan 12, 2021
78a9dbc
Merge pull request #1948 from Marwes/from_str
dtolnay Jan 12, 2021
c162d51
Add 128-bit integer support to de::IgnoredAny
TheJokr Jan 19, 2021
cd6697b
Merge pull request #1955 from TheJokr/patch-1
dtolnay Jan 19, 2021
398fba9
Release 1.0.120
dtolnay Jan 19, 2021
b276849
Prevent panic when deserializing malformed Duration
jonasbb Jan 20, 2021
44b9567
Merge pull request #1958 from jonasbb/duration-panic
dtolnay Jan 23, 2021
ba46f45
Merge pull request 1917 from Mingun/borrow-identifier
dtolnay Jan 23, 2021
60e08f9
Format PR #1917 with rustfmt 1.4.32
dtolnay Jan 23, 2021
34f4b68
Fix unneeded clone from PR #1917
dtolnay Jan 23, 2021
b20214d
Undo macro exports from PR #1917
dtolnay Jan 23, 2021
0a230e8
Inline forward_deserializer into private::de for Str deserializers
dtolnay Jan 23, 2021
034fe25
Remove redundant unused trait impls from private types from PR #1917
dtolnay Jan 23, 2021
d02eb22
Inline some unnecessary constructor functions from PR #1917
dtolnay Jan 23, 2021
c858a1f
Clean up unnecessary macro_use from PR #1917
dtolnay Jan 23, 2021
85de92e
Inline forward_deserializer for bytes deserializers
dtolnay Jan 23, 2021
0b5c56b
Touch up documentation from PR #1917
dtolnay Jan 23, 2021
8f09aea
Merge pull request #1959 from serde-rs/1917
dtolnay Jan 23, 2021
bd588db
Release 1.0.121
dtolnay Jan 23, 2021
a5ecbdb
Merge pull request 1916 from Mingun/expecting-customize
dtolnay Jan 23, 2021
88ee470
Format PR #1916 with rustfmt 1.4.32
dtolnay Jan 23, 2021
ed04824
Move RenameRule parse from trait fn to associated
dtolnay Jan 23, 2021
7db0982
Add error type to use for RenameRule parsing
dtolnay Jan 23, 2021
51d4563
Move RenameRule parse error message to a Display impl
dtolnay Jan 23, 2021
661206d
Merge pull request #1960 from serde-rs/renamerule
dtolnay Jan 23, 2021
990a502
Parse rename rules based on table of rules
dtolnay Jan 23, 2021
eaccae2
Fix UPPERCASE rename rule variant to follow idiomatic variant naming
dtolnay Jan 23, 2021
4e002ec
Provide list of recognized rename rules on parse error
dtolnay Jan 23, 2021
b7bad3a
Restore compatibility with rustc 1.31 in RenameRule error
dtolnay Jan 23, 2021
6670a30
Merge pull request #1961 from serde-rs/renamerule
dtolnay Jan 23, 2021
5fd5210
Merge pull request #1920 from Mingun/track_caller
dtolnay Jan 23, 2021
9add581
Update track_caller cfg link to show what version it's in
dtolnay Jan 23, 2021
012ea8e
Keep conditional compilation cfg naming consistent with serde crate
dtolnay Jan 23, 2021
fa6712d
Merge pull request #1918 from Mingun/fix-serde-test
dtolnay Jan 23, 2021
999b94d
Regenerate macrotest outputs for PR #1917
dtolnay Jan 24, 2021
e6b6602
Merge pull request 1914 from Mingun/seq-other
dtolnay Jan 24, 2021
84ad76b
Ignore too_many_lines clippy pedantic lint in serde_test
dtolnay Jan 24, 2021
b6a2d07
Return IdentifierDeserializer to just one associated type
dtolnay Jan 24, 2021
3f48ed3
Restore compatibility with rustc <1.31 in Borrowed identifier deseria…
dtolnay Jan 24, 2021
3728d3c
Eliminate duplicated borrowed and non-borrowed identifier deserializa…
dtolnay Jan 24, 2021
5aa163f
Revert "Regenerate macrotest outputs for PR #1917"
dtolnay Jan 24, 2021
18e5b03
Merge pull request #1962 from serde-rs/dupborrowed
dtolnay Jan 24, 2021
e24dbc4
Skip another clone of the fallthrough arm
dtolnay Jan 24, 2021
1f9f72b
Merge pull request 1898 from Mingun/bytes-into-deserializer
dtolnay Jan 24, 2021
f6e7366
Remove unused Debug impl on private::ser::content::Content
dtolnay Jan 24, 2021
c67017d
Fix handling of Self keyword in type definition
taiki-e Oct 23, 2020
e81f54f
Make AST borrow checker happy
taiki-e Oct 23, 2020
9fd56cd
Remove unused __private_deserialize macro, originally for doctests
dtolnay Jan 24, 2021
e61261e
Move doctest-only helpers to a doc module
dtolnay Jan 24, 2021
82d0fe0
Add link to rust-lang/rust#67295
dtolnay Jan 24, 2021
86c88be
Hide some irrelevant detail from de::value::Error's Debug impl
dtolnay Jan 24, 2021
fbcb223
Make use of fmt::Result type alias from libcore
dtolnay Jan 24, 2021
ac4001e
Remove some unused trait impls from private UnitOnly variant accessor
dtolnay Jan 24, 2021
cdc2fa1
Eliminate inferred bound on error type of value deserializer Debug impls
dtolnay Jan 24, 2021
7d1bc1f
Merge pull request #1963 from serde-rs/valuedebug
dtolnay Jan 24, 2021
2fd5212
Remove unused trait impls on private MapAsEnum
dtolnay Jan 24, 2021
85c6904
Remove dependency on syn/visit feature
dtolnay Jan 24, 2021
6ea446f
Suppress clippy unused_self pedantic lint
dtolnay Jan 25, 2021
b91713e
Suppress clippy should_implement_trait lint
dtolnay Jan 25, 2021
d1975f3
Update serde_derive_internals to tool attrs
dtolnay Jan 25, 2021
ff0f467
Opt in to pedantic clippy lints in serde_derive_internals
dtolnay Jan 25, 2021
bb7f94d
Add serde_derive_internals to clippy CI job
dtolnay Jan 25, 2021
ffed192
Release 1.0.122
dtolnay Jan 25, 2021
d88a474
Remove unused $ty arg from internal impl_deserialize_num macro
dtolnay Jan 25, 2021
48556a4
Reduce post-macro-expansion code in integer deserialize impls
dtolnay Jan 25, 2021
deaf600
Merge pull request #1965 from serde-rs/int
dtolnay Jan 25, 2021
1a3ef39
Merge pull request #1842 from Timmmm/fix2
dtolnay Jan 25, 2021
aeee73f
Merge pull request #1831 from taiki-e/borrow-macro
dtolnay Jan 25, 2021
1c03647
Move InPlaceSeed out of private mod
dtolnay Jan 25, 2021
38edb47
Move size_hint module out of private::de
dtolnay Jan 25, 2021
74ca066
Omit size_hint::cautious when not allocating
dtolnay Jan 25, 2021
b0cc213
Omit derive helpers in versions older than serde_derive msrv
dtolnay Jan 25, 2021
dfeaf77
Merge pull request #1966 from serde-rs/private
dtolnay Jan 25, 2021
68bda7a
Include serde crate in 1.31 CI job
dtolnay Jan 25, 2021
6e800ff
Test exhaustiveness of type match in collect_lifetimes
dtolnay Jan 25, 2021
6c5bf70
Merge pull request 1830 from taiki-e/self
dtolnay Jan 25, 2021
7cec99c
Pare down PR 1830
dtolnay Jan 25, 2021
033114a
Touch up PR 1830
dtolnay Jan 25, 2021
1f42358
Deduplicate token stream respanner
dtolnay Jan 25, 2021
e5efb6a
Remove dependency on syn/visit-mut feature
dtolnay Jan 25, 2021
b054ea4
Ignore some pedantic lints in serde_derive_internals from PR 1830
dtolnay Jan 25, 2021
6699b0b
Add regression test for issue 1969
dtolnay Jan 25, 2021
2ba9739
Substitute Self in output of Serialize derive
dtolnay Jan 25, 2021
29cdf88
Merge pull request #1970 from serde-rs/self
dtolnay Jan 25, 2021
3d6c414
Release 1.0.123
dtolnay Jan 25, 2021
de8ac1c
Allow floats to be deserialized from ints in untagged unions
arthurprs Nov 21, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/1-problem.md
@@ -0,0 +1,7 @@
---
name: Problem
about: Something does not seem right

---


7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/2-suggestion.md
@@ -0,0 +1,7 @@
---
name: Suggestion
about: Share how Serde could support your use case better

---


7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/3-documentation.md
@@ -0,0 +1,7 @@
---
name: Documentation
about: Certainly there is room for improvement

---


7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/4-other.md
@@ -0,0 +1,7 @@
---
name: Anything else!
about: Whatever is on your mind

---


166 changes: 166 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,166 @@
name: CI

on:
push:
pull_request:
schedule: [cron: "40 1 * * *"]

jobs:
test:
name: Test suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
- run: cd test_suite && cargo test --features unstable

windows:
name: Test suite (windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
- run: cd test_suite && cargo test --features unstable -- --skip ui --exact

stable:
name: Rust stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
- run: cd serde && cargo build --features rc
- run: cd serde && cargo build --no-default-features
- run: cd serde_test && cargo build
- run: cd serde_test && cargo test --features serde/derive,serde/rc

beta:
name: Rust beta
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@beta
- run: cd serde && cargo build --features rc
- run: cd test_suite && cargo test

nightly:
name: Rust nightly ${{matrix.os == 'windows' && '(windows)' || ''}}
runs-on: ${{matrix.os}}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows]
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
- run: cd serde && cargo build
- run: cd serde && cargo build --no-default-features
- run: cd serde && cargo build --no-default-features --features alloc
- run: cd serde && cargo build --no-default-features --features rc,alloc
- run: cd serde && cargo test --features derive,rc,unstable
- run: cd test_suite/no_std && cargo build
if: matrix.os != 'windows'

msrv:
name: Rust 1.13.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@1.13.0
- name: Get timestamp for cache
id: date
run: echo ::set-output name=yearmo::$(date +%Y%m)
- uses: actions/cache@v1
with:
path: ~/.cargo/registry/index
key: cargo-registry-index-${{steps.date.outputs.yearmo}}
- run: cd serde && cargo build --features rc
- run: cd serde && cargo build --no-default-features
- run: cd serde_test && cargo build

build:
name: Rust ${{matrix.rust}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [1.19.0, 1.20.0, 1.21.0, 1.25.0, 1.26.0, 1.34.0]
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- run: cd serde && cargo build --no-default-features
- run: cd serde && cargo build

more:
name: Rust ${{matrix.rust}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [1.27.0, 1.28.0]
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
# Work around failing to parse manifest because editions are unstable.
- run: sed -i /test_suite/d Cargo.toml
- run: cd serde && cargo build --no-default-features
- run: cd serde && cargo build

derive:
name: Rust 1.31.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@1.31.0
- run: cd serde && cargo check --no-default-features
- run: cd serde && cargo check
- run: cd serde_derive && cargo check

alloc:
name: Rust 1.36.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@1.36.0
- run: cd serde && cargo build --no-default-features --features alloc

emscripten:
name: Emscripten
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
- uses: actions/setup-node@v1
with:
node-version: 9
- name: Install cargo-web
run: |
CARGO_WEB_RELEASE=$(curl -L -s -H Accept:application/json https://github.com/koute/cargo-web/releases/latest)
CARGO_WEB_VERSION=$(echo "${CARGO_WEB_RELEASE}" | jq -r .tag_name)
CARGO_WEB_URL="https://github.com/koute/cargo-web/releases/download/${CARGO_WEB_VERSION}/cargo-web-x86_64-unknown-linux-gnu.gz"
mkdir -p ~/.cargo/bin
curl -L "${CARGO_WEB_URL}" | gzip -d > ~/.cargo/bin/cargo-web
chmod +x ~/.cargo/bin/cargo-web
- run: cd test_suite && cargo web test --target=asmjs-unknown-emscripten --nodejs
continue-on-error: true
- run: cd test_suite && cargo web test --target=wasm32-unknown-emscripten --nodejs
continue-on-error: true

clippy:
name: Clippy
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@clippy
# The need for -Aredundant_field_names here is a Clippy bug.
# https://github.com/rust-lang/rust-clippy/issues/5356
- run: cd serde && cargo clippy --features rc,unstable -- -D clippy::all -A clippy::redundant_field_names
- run: cd serde_derive && cargo clippy -- -D clippy::all
- run: cd serde_derive_internals && cargo clippy -- -D clippy::all
- run: cd serde_test && cargo clippy -- -D clippy::all -A clippy::redundant_field_names
- run: cd test_suite && cargo clippy --tests --features unstable -- -D clippy::all -A clippy::redundant_field_names
- run: cd test_suite/no_std && cargo clippy -- -D clippy::all -A clippy::redundant_field_names
4 changes: 3 additions & 1 deletion .gitignore
@@ -1,2 +1,4 @@
target
target/
**/*.rs.bk
*.sw[po]
Cargo.lock
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

61 changes: 61 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,61 @@
# Contributing to Serde

Serde welcomes contribution from everyone in the form of suggestions, bug
reports, pull requests, and feedback. This document gives some guidance if you
are thinking of helping us.

## Submitting bug reports and feature requests

Serde development is spread across lots of repositories, but this serde-rs/serde
repository is always a safe choice for opening any issues related to Serde.

When reporting a bug or asking for help, please include enough details so that
the people helping you can reproduce the behavior you are seeing. For some tips
on how to approach this, read about how to produce a [Minimal, Complete, and
Verifiable example].

[Minimal, Complete, and Verifiable example]: https://stackoverflow.com/help/mcve

When making a feature request, please make it clear what problem you intend to
solve with the feature, any ideas for how Serde could support solving that
problem, any possible alternatives, and any disadvantages.

## Running the test suite

We encourage you to check that the test suite passes locally before submitting a
pull request with your changes. If anything does not pass, typically it will be
easier to iterate and fix it locally than waiting for the CI servers to run
tests for you.

##### In the [`serde`] directory

```sh
# Test all the example code in Serde documentation
cargo test
```

##### In the [`test_suite/deps`] directory

```sh
# This is a prerequisite for running the full test suite
cargo clean && cargo update && cargo build
```

##### In the [`test_suite`] directory

```sh
# Run the full test suite, including tests of unstable functionality
cargo test --features unstable
```

[`serde`]: https://github.com/serde-rs/serde/tree/master/serde
[`test_suite/deps`]: https://github.com/serde-rs/serde/tree/master/test_suite/deps
[`test_suite`]: https://github.com/serde-rs/serde/tree/master/test_suite

## Conduct

In all Serde-related forums, we follow the [Rust Code of Conduct]. For
escalation or moderation issues please contact Erick (erick.tryzelaar@gmail.com)
instead of the Rust moderation team.

[Rust Code of Conduct]: https://www.rust-lang.org/policies/code-of-conduct
8 changes: 8 additions & 0 deletions Cargo.toml
@@ -0,0 +1,8 @@
[workspace]
members = [
"serde",
"serde_derive",
"serde_derive_internals",
"serde_test",
"test_suite",
]
33 changes: 0 additions & 33 deletions LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions LICENSE-MIT
@@ -1,5 +1,3 @@
Copyright (c) 2014 The Rust Project Developers

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
Expand Down