Commit Graph

262 Commits

Author SHA1 Message Date
Ty Overby 0cf1185e9d 0.7.0 2017-04-08 11:07:04 -07:00
Ty Overby 34679457d2 alpha7 2017-04-08 10:52:52 -07:00
zhangsoledad f23e430a88 update readme (#146) 2017-03-31 09:43:33 -07:00
Artyom Kazak dbfa111e2f Fix a typo in the readme (#145) 2017-03-25 09:11:49 -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 18cfe42d26 add more tests 2017-03-20 17:14:45 -07:00
Ty Overby 975f82cfb8 add size_hints 2017-03-20 08:29:26 -07:00
Ty Overby 9bc83fdf1e Update changelist.org 2017-03-19 20:13:00 -07:00
Ty Overby 539637d78b remove refbox (#140) 2017-03-19 20:10:35 -07:00
Ty Overby 2b465047b9 Eager prealloc no inline (#127)
* make SizeLimit a trait

* always preallocate
2017-03-17 18:14:59 -07:00
Ty Overby 461a694bac bump to alpha-6 2017-03-17 18:02:34 -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
slyrz 33b07e2bce Make example work with serde (#131)
* Make example work with serde

* Restore asserts
2017-03-07 10:14:46 -08:00
Kevin M Granger 01f13dc1b8 Fix small typo in readme: icp-channel -> ipc-channel (#129) 2017-03-06 14:38:06 -08:00
Ty Overby 392d960400 bump version number 2017-03-01 17:16:57 -08:00
Olaf Buddenhagen 5784fe28ad Fix unintentional breaking API change in `Serializer`/`Deserializer` (#128)
While introducing selectable endianness in
https://github.com/TyOverby/bincode/pull/103 , the new type parameter
has been hidden from the public `serialize()`, `deserialize()` etc.
functions, and only made available through an alternate API entry point.
The same kind of encapsulation also needs to be performed for the public
`Serializer` and `Deserializer` types.
2017-03-01 17:14:11 -08:00
Ty Overby 88f3197709 Merge branch 'master' of github.com:TyOverby/bincode 2017-02-25 10:06:06 -08:00
Ty Overby 1567d65ae9 fix oom 2017-02-24 19:04:46 -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
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