931 Commits

Author SHA1 Message Date
David Tolnay
ed479b4656
Release 1.0.48 v1.0.48 2020-02-12 21:39:13 -08:00
David Tolnay
ae4bbff11f
Show implementation of to_value in value::Serializer docs 2020-02-12 21:38:48 -08:00
David Tolnay
03e27f5eb7
Extend documentation of value::Serializer 2020-02-12 21:38:48 -08:00
David Tolnay
d5b4be8509
Merge pull request #621 from sdleffler/master
Expose `value::ser::Serializer`
2020-02-12 21:38:18 -08:00
Sean Leffler
9851d44dcc expose value serializer 2020-02-12 18:48:10 -08:00
David Tolnay
5efd1f4f1b
Ignore match_single_binding clippy lint 2020-02-12 18:19:23 -08:00
David Tolnay
8d0505803b
Update ui tests to nightly-2020-02-08 2020-02-07 18:07:46 -08:00
David Tolnay
6b5ded97b4
Release 1.0.47 v1.0.47 2020-02-07 11:42:29 -08:00
David Tolnay
b4d56a79d1
Merge pull request #617 from Xanewok/serde-no-std-error
Require serde >= 1.0.100 due to no_std-related Error re-export
2020-02-07 11:41:11 -08:00
Igor Matuszewski
8fdfedb5c1 Require serde >= 1.0.100 due to no_std-related Error re-export
Relevant Serde PR: https://github.com/serde-rs/serde/pull/1620

To support both no-/std builds without using somewhat noisy
conditional compilation directives, we implement the re-exported
`serde:🇩🇪:StdError` trait in https://github.com/serde-rs/json/pull/606.

However, this was only introduced in >= 1.0.100, so we need to bump
the version requirement of serde.

On the off chance of someone pulling in incompatible 1.0.4{5,6} versions
of serde_json, I believe it'd be good to yank those and cut a new
release with this patch.

Sorry for the omission in the original PR.

Fixes #612.
2020-02-07 20:10:44 +01:00
David Tolnay
39ed887748
Release 1.0.46 v1.0.46 2020-02-02 12:41:03 -08:00
David Tolnay
5263b6f0ed
Fixup serialize_entry PR 2020-02-02 12:39:45 -08:00
David Tolnay
1059dc3fed
Merge pull request #614 from jmfiaschi/map-serialize-entry
replace serialize key,value functions by serialize_entry
2020-02-02 12:37:33 -08:00
Jean-Marc Fiaschi
0b43936690 remplace serialize key,value functions by serialize_entry
call serialize_key/value into serialize_entry
2020-02-02 17:25:24 +01:00
David Tolnay
a03d5ffaa2
Merge pull request #610 from adetaylor/edit-test-instructions
Removing obsolete test instructions.
2020-01-24 21:39:21 -08:00
David Tolnay
f3b059c006
Discard unimportant lines from ui tests 2020-01-24 21:36:31 -08:00
Adrian Taylor
d19f389248 Removing obsolete test instructions. 2020-01-24 21:29:21 -08:00
David Tolnay
a39bcade70
Release 1.0.45 v1.0.45 2020-01-22 16:02:36 -08:00
David Tolnay
af4e6a1e91
Copy no-std note to rustdoc 2020-01-22 16:01:36 -08:00
David Tolnay
dca5037ee6
Tweak no-std wording to show Cargo.toml snippet 2020-01-22 16:00:55 -08:00
David Tolnay
67dfe5951b
Switch rustfmt skip to tool attribute 2020-01-22 15:57:07 -08:00
David Tolnay
41c3ab7e4a
Merge pull request #609 from Xanewok/patch-1
Correct no-std support in README.md
2020-01-22 15:56:52 -08:00
Igor Matuszewski
b855996096
Correct no-std support in README.md 2020-01-23 00:29:16 +01:00
David Tolnay
4bcc3625c3
Adopt dyn syntax for trait objects 2020-01-22 14:07:17 -08:00
David Tolnay
50faa3c000
Adopt inclusive range syntax 2020-01-22 14:06:03 -08:00
David Tolnay
17824dc1ea
Remove error variants that are never constructed 2020-01-22 14:04:18 -08:00
David Tolnay
7cf0156d47
Switch to tool attrs 2020-01-22 14:03:12 -08:00
David Tolnay
97f87f2587
Adopt pub(crate) 2020-01-22 13:59:08 -08:00
David Tolnay
17d9a5ea9b
Organize imports 2020-01-22 13:53:35 -08:00
David Tolnay
3040daa1c6
Update tests to 2018 edition 2020-01-22 13:45:47 -08:00
David Tolnay
c19f26a518
Update serde_json_test to 2018 edition 2020-01-22 13:43:34 -08:00
David Tolnay
d095bab515
Remove ```edition2018 from doc tests after edition update 2020-01-22 13:42:51 -08:00
David Tolnay
70b64fd657
Update to 2018 edition 2020-01-22 13:41:21 -08:00
David Tolnay
873a7e9574
Rename try! macro to avoid 2018 edition keyword 2020-01-22 13:34:37 -08:00
David Tolnay
a79024468c
Raise minimum supported rustc to 1.31 2020-01-22 13:02:04 -08:00
David Tolnay
f20ca3b054
Really disable serde std feature in CI
When building the crate root, serde/std gets enabled transitively
through our dev-dependency on trybuild. This is a Cargo bug but for now
work around it.
2020-01-22 12:59:10 -08:00
David Tolnay
ab4ca99fcb
Omit to_writer and Serializer in no_std mode
These rely on the caller to pass in a Write impl; the impls provided in
serde_json are only for Vec<u8> and I don't want to be in the business
of copying many more Write impls from std into serde_json.
2020-01-22 12:59:10 -08:00
David Tolnay
0de7b516f5
Remove Read and Bytes
These are unused in no-std mode; the Read trait had no implementations.
2020-01-22 12:59:10 -08:00
David Tolnay
1f616f081a
Omit from_reader in no_std mode 2020-01-22 12:59:10 -08:00
David Tolnay
7b0b96e6ab
Remove more of core io error 2020-01-22 12:59:09 -08:00
David Tolnay
7f41cbe201
Remove unneeded Debug impl on io error
Io errors can never occur in no_std mode.
2020-01-22 12:59:09 -08:00
David Tolnay
7051b992e0
Remove WriteZero error kind 2020-01-22 12:59:09 -08:00
David Tolnay
def04dedc1
Remove source method in no_std mode
An io error can never occur in no_std mode so the source method is never
applicable.
2020-01-22 12:59:09 -08:00
David Tolnay
cf3beee3d2
Remove unneeded itoa std feature
This feature is not used by serde_json even in std mode.
2020-01-22 12:59:09 -08:00
David Tolnay
67857df516
Remove unnecessary box trait object from io error repr 2020-01-22 12:59:09 -08:00
David Tolnay
e83673adea
Remove unnecessary From<Error> for io::Error in no_std mode 2020-01-22 12:59:09 -08:00
David Tolnay
85008aa29c
Preserve underlying Debug representation for io error 2020-01-22 12:59:09 -08:00
David Tolnay
ab661bb29c
Remove unused ErrorKind from io error repr 2020-01-22 12:59:08 -08:00
David Tolnay
5741cfb44a
Remove unused Simple io error variant 2020-01-22 12:59:08 -08:00
David Tolnay
f063631c0a
Remove reliance on serde StdError for io error repr
There is no impl Into<Box<dyn serde:🇩🇪:StdError + Send + Sync>> for
&str in no_std mode, which was expected by code elsewhere in the crate.

    error[E0277]: the trait bound `alloc::boxed::Box<(dyn serde:🇩🇪:StdError + core::marker::Send + core::marker::Sync + 'static)>: core::convert::From<&str>` is not satisfied
       --> src/value/mod.rs:199:13
        |
    199 |             io::Error::new(io::ErrorKind::Other, "fmt error")
        |             ^^^^^^^^^^^^^^ the trait `core::convert::From<&str>` is not implemented for `alloc::boxed::Box<(dyn serde:🇩🇪:StdError + core::marker::Send + core::marker::Sync + 'static)>`
        |
       ::: src/io/core.rs:62:12
        |
    62  |     pub fn new<E>(kind: ErrorKind, error: E) -> Error
        |            ---
    63  |     where
    64  |         E: Into<Box<dyn serde:🇩🇪:StdError + Send + Sync>>,
        |            ------------------------------------------------ required by this bound in `io:👿:Error::new`
        |
        = help: the following implementations were found:
                  <alloc::boxed::Box<T> as core::convert::From<T>>
                  <alloc::boxed::Box<[T]> as core::convert::From<&[T]>>
                  <alloc::boxed::Box<[T]> as core::convert::From<serde::export::Vec<T>>>
                  <alloc::boxed::Box<[u8]> as core::convert::From<alloc::boxed::Box<str>>>
                and 2 others
        = note: required because of the requirements on the impl of `core::convert::Into<alloc::boxed::Box<(dyn serde:🇩🇪:StdError + core::marker::Send + core::marker::Sync + 'static)>>` for `&str`
2020-01-22 12:59:08 -08:00