Commit Graph

238 Commits

Author SHA1 Message Date
Ty Overby 42a8164756 bump version 2017-02-24 18:55:44 -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
Ty Overby 6ece2f5866 Add a "Bincode in the wild" section (#117)
* Add a "Bincode in the wild" section

* Change wording
2017-02-23 10:21:19 -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
Ty Overby 19538cff29 Run tests on all channels (#108)
* Run tests on all channels

* try using travis.ci rust support
2017-02-03 09:54:39 -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 419411d004 Remove sized bounds where appropriate (#101)
* Remove sized bounds where appropriate

* Make bounds compatible with stable
2017-01-31 20:24:08 -08:00
Ty Overby fac69cfcaa Remove rustc-serialize from cargo.toml 2017-01-31 20:20:26 -08:00
Ty Overby e7a74aa6c2 Remove rustc serialize support (#95)
* Remove rustc_serialize support

* Add changelist and bump version number for alpha

* Move refbox and friends into own module

* update changelog

* update travis config

* move serde functions out into global namespace
2017-01-31 15:50:55 -08:00
Ty Overby 8998ecaef6 Merge branch 'master' of github.com:TyOverby/bincode 2017-01-31 15:42:44 -08:00
Ty Overby 5bfd688819 change error message (#97)
* change error message

* add InfiniteSequence case to SerializeError

* Change name
2017-01-31 12:56:25 -08:00
Ty Overby e4ce955928 change error message 2017-01-31 11:23:08 -08:00
Lena Hellström ab3f627ca8 Don't panic. (#96) 2017-01-31 11:21:07 -08:00
Ty Overby ecb51cb8bd update authors and docs link 2017-01-31 10:43:47 -08:00
Ty Overby f4c5c7b86d Merge branch 'master' of github.com:TyOverby/bincode 2017-01-31 10:20:18 -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
Ty Overby 147a89f8d7 bump version 2017-01-05 17:26:50 -08:00
Matt Brubeck 814aa7d239 Update to byteorder 1.0 (#91) 2017-01-05 17:25:40 -08:00
David Tolnay 3d4346808f More efficient serialize_bytes (#90)
* Update to serde_derive

* Fix missing Encoder and Decoder imports

* Add test for serializing bytes

* More efficient serialize_bytes

Reported in #serde: blank_name2 tried serializing
`HashMap<String, HashSet<Bytes>>` vs `HashMap<String, HashSet<&Path>>`,
the `&Path` version was done in ~.6 seconds while the
`&[u8]` one took a full 3 seconds more.
2016-12-12 18:26:26 +00:00
Nikita Baksalyar 8d708cd194 Delegate emit_enum_struct_variant calls to emit_enum_variant (#89)
* Delegate emit_enum_struct_variant calls to emit_enum_variant

read_enum_struct_variant delegates calls to read_enum_variant which
expects u32 prefix to encode a variant number. Previous implementation
of emit_enum_struct_variant doesn't emit it, making serialized data
invalid.

* Add test to check manual enum encoding
2016-11-27 13:08:20 -08:00
Brian Bowman e96a3645fa Fix typo in bincode::serde (#88) 2016-09-20 16:03:54 -07:00
Ty Overby 44ea3bbbdb 0.6.0 2016-07-28 12:35:40 -07:00
Ty Overby aa531e465a Merge branch 'master' of github.com:TyOverby/bincode 2016-07-28 12:24:06 -07:00
David Tolnay 95b414a184 Update to serde 0.8.0 (#84) 2016-07-28 12:23:18 -07:00
Ty Overby 23cb6ea79c 0.5.9 2016-07-08 06:55:29 -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
Anthony Ramine 8f98e8789d 0.5.8 2016-06-30 14:13:17 +02:00
Anthony Ramine cea0ef6fed Merge pull request #81 from oli-obk/master
fix char serialization and deserialization
2016-06-30 14:12:11 +02:00
Oliver Schneider 2eee182f1f fix char serialization and deserialization 2016-06-30 14:02:07 +02:00
Ty Overby 2ae255e634 0.5.7 2016-06-19 13:30:27 -07: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
David Tolnay 629d7bc640 Impl Deserialize for non-'static lifetimes (#79) 2016-06-19 13:23:21 -07:00
Ty Overby 45cfc7da9a bump version number 2016-04-28 17:31:36 -07:00
Ms2ger c7bdb4a90c Use num-traits. (#72) 2016-04-21 09:28:33 -07:00
Alexander Bulaev 834e4c3656 Don't pull `rustc-serialize` from `num` (#71) 2016-04-15 14:22:39 -07:00
Alexander Bulaev ff69e6f3e1 Add cargo features for rustc-serialize and serde (#70)
* Add cargo features for rustc-serialize and serde

If you only really need one of them

* Check that both "serde" and "rustc-serialize" are compiling

* Minor: change Travis build order
2016-04-15 11:03:32 -07:00
Ty Overby c2fc3af47c Better travis tests (#69)
Use multirust to switch between language versions.

Only run tests on nightly (because the serde macros won't build anywhere else).
2016-04-12 10:28:55 -07:00
Ty Overby 21329a0e53 v0.5.3 2016-04-12 09:28:21 -07:00
Jayson Reis 183c28e363 Upgrade byteorder to 0.5.x (#68) 2016-04-12 09:26:18 -07:00
Ty Overby e5e74307fa Merge pull request #67 from Seeker14491/patch-2
fix typo
2016-04-07 08:10:49 -07:00
Brian Bowman 127380a506 fix typo 2016-04-07 03:05:41 -05:00
Ty Overby 35aa19b6fb bump cargo version 2016-04-04 13:34:18 -07:00
Ty Overby c62b7a909b Merge pull request #66 from TyOverby/more_tests
add more tests
2016-04-04 13:29:51 -07:00
Ty Overby c819545c50 add more tests 2016-04-04 08:16:50 -07:00
Ty Overby 01ff0e6209 Merge pull request #65 from TyOverby/revert-sizechecks
Revert "Respect size limits in read_seq and read_map."
2016-04-04 08:01:56 -07:00
Ty Overby 772b1da6df Revert "Respect size limits in read_seq and read_map."
This reverts commit 1e21e5d13b.
2016-04-03 15:44:21 -07:00
Ty Overby 8b14cbda92 bump version to v0.5.1 2016-03-16 09:21:30 -07:00
Ty Overby 87bf29d407 Merge pull request #63 from canndrew/size-limits
Respect size limits in read_seq and read_map.
2016-03-15 11:46:06 -07:00
Andrew Cann ce61edb51f Replace use of saturating_add 2016-03-10 17:27:51 +08:00