Commit Graph

28 Commits

Author SHA1 Message Date
David Tolnay 7eccffd783 Update to serde 1.0 branch (#149)
* Update to serde 1.0 branch

* The serde 1.0 branch merged
2017-04-19 16:05:59 -07:00
Ty Overby b3acb6ea60 remove read_bytes (#143) 2017-03-22 13:08:37 -07:00
Ty Overby c6fa2358e5 add docs to everything that was undocumented 2017-03-20 17:32:55 -07:00
Ty Overby 975f82cfb8 add size_hints 2017-03-20 08:29:26 -07:00
Ty Overby f4c97fde6a make SizeLimit a trait (#124)
* make SizeLimit a trait

* move inline to the correct location
2017-03-17 17:59:12 -07:00
Ty Overby ed65f9abeb call read_bytes iteratively inside of read_vec (#138) 2017-03-13 09:24:38 -07:00
slyrz 05d1936caf Make read_vec more robust (#134)
* Make read_vec more robust

* Remove check for overflowing add

* Let the two read_vec functions become one again
2017-03-09 11:04:51 -08:00
slyrz 6c3b677dd7 Revamp deserialize_char (#133)
* Remove unneccesary unwrap

* Use a single buffer for reading a char

* Replace while loop with read_exact

* Remove first_byte variable

* Use read_exact to avoid waiting for data after EOF

* Create error in a closure
2017-03-09 11:02:27 -08:00
Ty Overby 1631cb2d80 Make Reader and Writer generic on Endianness (#103)
* Make Reader and Writer generic on Endianness

* make alternate API modules

* add test asserting that big endian encoding is different from little endian encoding

* clean up tests
2017-02-24 18:58:46 -08:00
Tim 3471118004 Smarter deserialize_bytes and deserialize_byte_buf (#115)
* Smarter deserialize_bytes

* Make read_vec faster by pre-allocating the correct amount of space.

Also, call visit_bytes in deserialize_bytes rather than visit_byte_buf.
2017-02-23 12:31:59 -08:00
Lena Hellström cac9301615 Remove InvalidEncoding struct (#111) 2017-02-10 10:19:58 -08:00
Lena Hellström ffbe4387dd Combine error types (#104)
* Combine error types

* Correct errors from merge conflict

* Create ErrorKind and Box it up

* Fix merge errors.

* Fix merge errors re-adding length encoding.
2017-02-09 23:07:20 -08:00
Lena Hellström 565b9c9f41 Remove length encoding (#102)
* Remove length encoding

* Improve bytes() test.
2017-02-03 09:27:03 -08:00
Lena Hellström c6393ac561 Update to serde 0.9.X (#93)
* Update to serde 0.9.X

* Remove redundant visitor and bad namespacing.

* Change DeserializeError to use Strings.

Reintroduce error tests.

* Better DeserializeError messages.

* Fix warnings.
2017-01-31 09:59:29 -08:00
David Tolnay 95b414a184 Update to serde 0.8.0 (#84) 2016-07-28 12:23:18 -07:00
Cobrand c5073e83e5 pub used InvalidEncoding in serde+rustc_serialize so it shows in `cargo doc` (#82)
* Removed unused import warning

* pub use InvalidEncoding in serde+rustc_serialize

* Made both fields of InvalidEncoding public so it can be used without Display or Debug traits (e.g. pattern matching)
* Export of InvalidEncoding in rustc_serialize/serde make them visible in `cargo doc`
2016-07-08 06:53:43 -07:00
Oliver Schneider 2eee182f1f fix char serialization and deserialization 2016-06-30 14:02:07 +02:00
Dmitry e5a524ed28 Fixed size array deserialization (#76)
* Attempt to implement hint for fixed size arrays.

* Removed wrong visitor + tests.

* Removed extra new line.
2016-06-19 13:29:10 -07:00
Ms2ger c7bdb4a90c Use num-traits. (#72) 2016-04-21 09:28:33 -07:00
Jayson Reis 183c28e363 Upgrade byteorder to 0.5.x (#68) 2016-04-12 09:26:18 -07:00
Ty Overby bde9aa6565 add initial support for serde 0.7 2016-03-04 10:44:28 -08:00
Ty Overby 9824d8061c ignore instead of no_run 2016-02-07 17:03:47 -08:00
Ty Overby 7fba81da1e should parse now 2016-02-07 17:00:24 -08:00
Ty Overby 13d9e30813 no run on tests 2016-02-07 16:56:51 -08:00
Ty Overby 05850df34a Merge branch 'master' of github.com:TyOverby/bincode 2016-02-07 16:46:33 -08:00
Ty Overby 25cfb15823 add more docs 2016-02-07 16:46:23 -08:00
Ty Overby 7662a57727 add more useful syntax error messages 2016-01-19 08:46:33 -08:00
Ty Overby 0cfb64511c moved the two designs into modules 2015-08-07 17:35:27 -07:00