aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-01-19i128: enable support for 128-bit integers automaticallyAndrew Gallant
This adds a build.rs to byteorder that will set a conditional compilation flag automatically if the current Rust compiler supports 128-bit integers. This makes the i128 feature itself a no-op. We continue to allow the feature to be supplied for backwards compatibility. Addresses https://github.com/TyOverby/bincode/issues/250
2019-01-19deps: update quickcheck and randAndrew Gallant
Fixes #127
2018-08-25deps: more updates in test code for rand 0.4 -> 0.5Andrew Gallant
2018-08-25deps: update to quickcheck 0.7Andrew Gallant
Our dev-dependencies already pushed us over the minimum Rust version supported (1.12.0), so we continue with the status quo of only testing on stable/beta/nightly, but ensure that we continue to build on Rust 1.12.0.
2018-07-31byteorder: fix typos in ReadBytesExt docsfpgaminer
Closes #129
2018-07-31byteorder: add doc tests for WriteBytesExt methodsfpgaminer
Closes #129
2018-07-30byteorder: add {u,i}48 methodsfpgaminer
PR #128
2018-05-12i128: get rid of i128 Rust featureLee Bousfield
We no longer need to enable the i128 Rust feature, since it is stabilized. We leave byteorder's i128 feature in tact to preserve compilation on Rust 1.12.
2018-04-04remove unnecessary cfg in examplesTrevor Spiteri
2018-04-01doc: miscellaneous improvementsBruce Mitchener
2018-04-01style: remove all uses of transmuteAndrew Gallant
We should have done this from the start. Everything can be accomplished via pointer casts. Benchmarks show negligible differences.
2018-04-01style: remove unnecessary mutAndrew Gallant
2018-03-22clippy: fix a couple of markdown warningsBruce Mitchener
2017-12-08Use depcrated tag instead of pure documentationMarcel Hellwig
Since nearly 2 years, there is a depcrated attribute, which can be used https://github.com/rust-lang/rfcs/blob/master/text/1270-deprecation.md
2017-11-291.2.1Andrew Gallant
2017-11-29remove more unsafeAndrew Gallant
This removes the `unsafe` annotation from `read_{f32,f64}_into_unchecked` and deprecates the methods because the `unchecked` name is no longer appropriate. We in turn add `read_{f32,f64}_into` methods.
2017-11-291.2.0Andrew Gallant
2017-11-29remove unnecessary unsafeAndrew Gallant
See also #105 Fixes #103
2017-11-29remove now-irrelevant snan testAlexis Beingessner
2017-11-29make int->float conversion a transmuteAlexis Beingessner
This is the mirror commit to https://github.com/rust-lang/rust/pull/46012
2017-11-29Fix prop_ext_[u]int_*::native_endian on BE targetsJosh Stone
The similar `big_endian` tests were using an offset to read from the end of the written `u64`, but the `native_endian` tests were reading directly, just like the `little_endian` tests. That's of course only correct when the target actually is little endian. That `big_endian` offset is now sliced directly, instead of cloning into another vector, and then this logic is also used in the `native_endian` test, depending on the current `#[cfg(target_endian)]`. Fixes #102.
2017-07-09slices: add slice methods for ReadBytesExtAndrew Gallant
As a consequence, this also introduces methods for doing endian conversion on slices in-place.
2017-07-09rename new.rs to io.rsAndrew Gallant
In the long ago, "new" referred to the "new I/O module" after I/O reform in the pre-1.0 days.
2017-07-09add slice methodsAndrew Gallant
This commit builds on PR #91 by @newpavlov to add methods to the ByteOrder trait that permit serializing/deserializing contiguous sequences of integers to/from byte buffers.
2017-07-09add BE and LE type aliasesAndrew Gallant
2017-07-09fix formattingAndrew Gallant
2017-07-09Slice methods additionArtyom Pavlov
Closes #63
2017-07-08floats: remove unnecessary transmuteAndrew Gallant
Thanks @le-jzr!
2017-07-08floats: make reading floats safeSam Whited
This commit modifies the existing read_f32/read_f64 methods to guarantee their safety by returning NaNs when signaling NaNs are detected. Fixes #71
2017-07-08Add more examples for {u,i}128 methodsSam Whited
2017-07-08Fix some typos in the docsSebastian Dröge
Unsigned integer types were given for the signed functions of the ByteOrder trait
2017-07-08Add 24 bit integer read/write functionsSebastian Dröge
The trait has default implementations around read_int/read_uint to keep all existing instances working without changes, but implementations can implement something more optimal if needed.
2017-03-29Add examples for {u,i}128 methodsSam Whited
2017-03-29Add i128 supportquininer kel
Adds the following methods to the `ByteOrder` trait: * `read_{i128, u128}` * `write_{i128, u128}` * `{read_uint,read_int,write_uint,write_int}128` Adds the following methods to the `ReadBytesExt` trait: * `read_{i128, u128}` * `{read_uint, read_int}128` Adds the following methods to the `WriteBytesExt` trait: * `write_{i128, u128}` * `{write_uint, write_int}128` And finally, add tests and benchmarks for i128 support. Fixes #65
2017-03-28Add example to Read methodsSam Whited
2017-03-28Add examples to most methodsSam Whited
Updates #75 Updates #76
2017-03-28Seal ByteOrder trait against external implementationsSam Whited
Fixes #69 Updates #76
2017-03-28Add 'Errors' headers. Fixes #72Brian Anderson
2017-03-28Add html_root_url to lib.rs. Fixes #77Brian Anderson
2017-03-28Add 'Panics' headers. Fixes #72Brian Anderson
2017-03-28Panic in default methods. Fixes #68Brian Anderson
2016-12-30fix tests againAndrew Gallant
2016-12-30Require impls for all derive-able traits for ByteOrderNick Fitzgerald
This adds trait bounds to ByteOrder for all the traits that can automatically be derived. Next, it derives them all for BigEndian and LittleEndian. The exception is Default, which cannot be derived for enums, and it is explicitly implemented as unreachable. Fixes #52.
2016-12-30fix testsAndrew Gallant
2016-12-30Fix up CI, test no_std.Andrew Gallant
2016-12-30Prepare for 1.0, switch to docs.rs.Andrew Gallant
Fixes #57
2016-05-30Replacing std size_of with core size_of.David Tulig
This allows byteorder to be used in a no_std context.
2016-05-21Fixes undefined behavior reported in #47.Andrew Gallant
Instead of casting pointers, we do a proper unaligned load using copy_nonoverlapping. Benchmarks appear unaffected on Linux x64.
2016-05-02Enable usage in no_std contextsCorey Richardson
2016-03-24Add NetworkEndian aliasBrian Campbell
Network byte order is defined by [RFC 1700][1] to be big-endian, and is referred to in several protocol specifications. This type is an alias of BigEndian. This alias can be used to make it more clear why you're using a particular byte order in code, if you are implementing a specification that refers to network byte order. [1]: https://tools.ietf.org/html/rfc1700