aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack O'Connor <oconnor663@gmail.com>2019-05-17 16:40:54 -0400
committerAndrew Gallant <jamslam@gmail.com>2019-06-09 09:40:43 -0400
commitfd3fb623b3fbff689892a1641c99b4168076146b (patch)
tree425a15c700bc44722650b64fd9cb3be4aeb4f13b
parent81889427848a53b922c2bffb7ae0683273aa3d6f (diff)
downloadplatform_external_rust_crates_byteorder-fd3fb623b3fbff689892a1641c99b4168076146b.tar.gz
platform_external_rust_crates_byteorder-fd3fb623b3fbff689892a1641c99b4168076146b.tar.bz2
platform_external_rust_crates_byteorder-fd3fb623b3fbff689892a1641c99b4168076146b.zip
doc: list alternatives, as Rust 1.32
Closes #148
-rw-r--r--README.md11
-rw-r--r--src/lib.rs10
2 files changed, 17 insertions, 4 deletions
diff --git a/README.md b/README.md
index f282ab7..8940b29 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-This crate provides convenience methods for encoding and decoding numbers in
-either big-endian or little-endian order.
+This crate provides convenience methods for encoding and decoding
+numbers in either big-endian or little-endian order.
[![Build status](https://api.travis-ci.org/BurntSushi/byteorder.svg)](https://travis-ci.org/BurntSushi/byteorder)
[![](http://meritbadge.herokuapp.com/byteorder)](https://crates.io/crates/byteorder)
@@ -54,3 +54,10 @@ in a `no_std` context, add the following to your `Cargo.toml`:
[dependencies]
byteorder = { version = "1", default-features = false }
```
+
+
+### Alternatives
+
+Note that as of Rust 1.32, the standard numeric types provide built-in methods
+like `to_le_bytes` and `from_le_bytes`, which support some of the same use
+cases.
diff --git a/src/lib.rs b/src/lib.rs
index 2ce9603..db4d24d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,6 +1,6 @@
/*!
-This crate provides convenience methods for encoding and decoding numbers
-in either [big-endian or little-endian order].
+This crate provides convenience methods for encoding and decoding numbers in
+either [big-endian or little-endian order].
The organization of the crate is pretty simple. A trait, [`ByteOrder`], specifies
byte conversion methods for each type of number in Rust (sans numbers that have
@@ -49,6 +49,12 @@ when built with the `i128` feature enabled.
This crate can also be used without the standard library.
+# Alternatives
+
+Note that as of Rust 1.32, the standard numeric types provide built-in methods
+like `to_le_bytes` and `from_le_bytes`, which support some of the same use
+cases.
+
[big-endian or little-endian order]: https://en.wikipedia.org/wiki/Endianness
[`ByteOrder`]: trait.ByteOrder.html
[`BigEndian`]: enum.BigEndian.html