[rust] Uprev eui48 to 0.4.6 from 0.4.2

Release history https://docs.rs/crate/eui48/

Test: Build
Change-Id: If6ebc61792533cbef8d3c5f9a5bc6e6f85748e02
diff --git a/rustc_deps/Cargo.lock b/rustc_deps/Cargo.lock
index 8190dee..3f548b3 100644
--- a/rustc_deps/Cargo.lock
+++ b/rustc_deps/Cargo.lock
@@ -405,7 +405,7 @@
 
 [[package]]
 name = "eui48"
-version = "0.4.2"
+version = "0.4.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -497,7 +497,7 @@
  "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "derp 0.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.19.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "eui48 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "eui48 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "font-rs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "fuchsia-async-macro 0.1.0",
@@ -2170,7 +2170,7 @@
 "checksum digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90"
 "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0"
 "checksum euclid 0.19.4 (registry+https://github.com/rust-lang/crates.io-index)" = "dbbf962bb6f877239a34491f2e0a12c6b824f389bc789eb90f1d70d4780b0727"
-"checksum eui48 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ffc324d178f846c5f8524a8f0477060bac4ebe89f5d9e508af56dbe36bfa86b"
+"checksum eui48 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8c4cf866e4d3e5e773691f5f61615a224a7b0b72b7daf994fc56d1b82dab0b6b"
 "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
 "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1"
 "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
diff --git a/rustc_deps/Cargo.toml b/rustc_deps/Cargo.toml
index 63b39e8..41a9ca3 100644
--- a/rustc_deps/Cargo.toml
+++ b/rustc_deps/Cargo.toml
@@ -22,7 +22,7 @@
 data-encoding = "2.1.2"
 derp = "0.0.11"
 euclid = "0.19"
-eui48 = { version = "0.4.2", features = ["serde"] }
+eui48 = { version = "0.4.6", features = ["serde", "disp_hexstring"] }
 failure = "0.1.1"
 font-rs = "0.1.3"
 fuchsia-async-macro = "0.1"
diff --git a/rustc_deps/vendor/eui48/.cargo-checksum.json b/rustc_deps/vendor/eui48/.cargo-checksum.json
index 551c526..04795d6 100644
--- a/rustc_deps/vendor/eui48/.cargo-checksum.json
+++ b/rustc_deps/vendor/eui48/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"9decae7300b45c1bcf523f110b0e550c22353ff1ae08e6eb12e0002cd13f953f","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"feb30c5003cc435b728ba6c2fcd167e2b6933ea7b522c67c039d8a65482dfb9d","src/lib.rs":"f936cb675622ccfe1448707c43f12ecc57e55c76045ea77cade14dd84de56947"},"package":"3ffc324d178f846c5f8524a8f0477060bac4ebe89f5d9e508af56dbe36bfa86b"}
\ No newline at end of file
+{"files":{"Cargo.toml":"da63b33db3a5b490825f7a3cfe254d3caaa59a7c770701a3e8570e806a9c3b38","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"02af74eaa9f1345a41ebe1bf3eeb05204440c09bbaebdde5f919b6eb16048cc3","README.tpl":"95044f8dd6a0c8319cc4ed0000f9be745c603c371e646712852956f3451e4547","appveyor.yml":"8c07196d8796b458689a2f69b6937f32f3a6f240211065a15bf8cbbd198bd7c7","src/lib.rs":"77d65925adc35fa5dfb7516f4ed8facbf202a9e9defd947497b6fe9441e79cf1"},"package":"8c4cf866e4d3e5e773691f5f61615a224a7b0b72b7daf994fc56d1b82dab0b6b"}
\ No newline at end of file
diff --git a/rustc_deps/vendor/eui48/Cargo.toml b/rustc_deps/vendor/eui48/Cargo.toml
index d19abc1..7d76104 100644
--- a/rustc_deps/vendor/eui48/Cargo.toml
+++ b/rustc_deps/vendor/eui48/Cargo.toml
@@ -11,14 +11,16 @@
 # will likely look very different (and much more reasonable)
 
 [package]
+edition = "2018"
 name = "eui48"
-version = "0.4.2"
+version = "0.4.6"
 authors = ["Andrew Baumhauer <andy@baumhauer.us>", "<rlcomstock3@github.com>", "Michal 'vorner' Vaner <vorner+github@vorner.cz>"]
+exclude = [".gitignore", ".travis.yml", ".gitlab-ci.yml", ".travis/*"]
 description = "A library to generate and parse IEEE EUI-48 and EUI-64, also known as MAC-48 media access\ncontrol addresses. The IEEE claims trademarks on the names EUI-48 and EUI-64, in which EUI is an\nabbreviation for Extended Unique Identifier.\n"
 homepage = "https://github.com/abaumhauer/eui48"
-documentation = "https://docs.rs/eui48/0.4.2/eui48/"
 readme = "README.md"
 keywords = ["EUI-48", "MAC", "MAC-48", "networking", "MACADDR"]
+categories = ["network-programming", "parser-implementations"]
 license = "MIT/Apache-2.0"
 repository = "https://github.com/abaumhauer/eui48"
 [dependencies.rustc-serialize]
@@ -27,3 +29,28 @@
 [dependencies.serde]
 version = "1.0.80"
 optional = true
+
+[dependencies.serde_json]
+version = "1.0.37"
+optional = true
+
+[features]
+default = []
+disp_hexstring = []
+[badges.appveyor]
+branch = "master"
+repository = "abaumhauer/eui48"
+service = "github"
+
+[badges.codecov]
+branch = "master"
+repository = "abaumhauer/eui48"
+service = "github"
+
+[badges.gitlab]
+branch = "master"
+repository = "abaumhauer/eui48"
+
+[badges.travis-ci]
+branch = "master"
+repository = "abaumhauer/eui48"
diff --git a/rustc_deps/vendor/eui48/README.md b/rustc_deps/vendor/eui48/README.md
index 1909593..f9b76fe 100644
--- a/rustc_deps/vendor/eui48/README.md
+++ b/rustc_deps/vendor/eui48/README.md
@@ -1,15 +1,15 @@
+[![Crates.io](https://img.shields.io/crates/v/eui48.svg)](https://crates.io/crates/eui48)
+[![docs.rs](https://docs.rs/eui48/badge.svg)](https://docs.rs/eui48)
+[![Build Status](https://ci.appveyor.com/api/projects/status/github/abaumhauer/eui48?branch=master&svg=true)](https://ci.appveyor.com/project/abaumhauer/eui48/branch/master)
+[![Build Status](https://gitlab.com/abaumhauer/eui48/badges/master/build.svg)](https://gitlab.com/abaumhauer/eui48/commits/master)
+[![Build Status](https://travis-ci.org/abaumhauer/eui48.svg?branch=master)](https://travis-ci.org/abaumhauer/eui48)
+[![Coverage Status](https://codecov.io/gh/abaumhauer/eui48/branch/master/graph/badge.svg)](https://codecov.io/gh/abaumhauer/eui48)
+
 eui48
 ====
 
-[![Build Status](https://travis-ci.org/abaumhauer/eui48.svg?branch=master)](https://travis-ci.org/abaumhauer/eui48)
-[![Documentation](https://docs.rs/abaumhauer/badge.svg)](https://docs.rs/eui48/)
-[![Crate](https://img.shields.io/crates/v/eui48.svg)](https://crates.io/crates/eui48)
-
 A Rust library to represent and parse IEEE EUI-48 also known as MAC-48 media access control addresses. The IEEE claims trademarks on the names EUI-48 and EUI-64, in which EUI is an abbreviation for Extended Unique Identifier.
 
-
-[Documentation](https://docs.rs/eui48)
-
 ## Usage
 
 Add this to your `Cargo.toml`:
@@ -17,7 +17,7 @@
 ```toml
 [dependencies]
 
-eui48 = "0.4.2"
+eui48 = "0.4.6"
 ```
 
 and this to your crate root:
@@ -63,3 +63,7 @@
 - 0.4.0 Rainer Stademann - Define ABI as repr(C)
 - 0.4.1 Andrew Baumhauer - Add IPv6 Interface ID and Link Local conversions
 - 0.4.2 Andrew Baumhauer / Eric Clone - Bug fix in is_local() and is_unicast() functions
+- 0.4.3 Andrew Baumhauer - Update travis-ci, appveyor, codecov
+- 0.4.4 Andrew Baumhauer - Update documentation
+- 0.4.5 Andrew Baumhauer - Improve code coverage and tests
+- 0.4.6 Jiwoong Lee - Add to_array() for compatibility, add feature disp_hexstring
diff --git a/rustc_deps/vendor/eui48/README.tpl b/rustc_deps/vendor/eui48/README.tpl
new file mode 100644
index 0000000..cb30727
--- /dev/null
+++ b/rustc_deps/vendor/eui48/README.tpl
@@ -0,0 +1,14 @@
+[![Crates.io](https://img.shields.io/crates/v/eui48.svg)](https://crates.io/crates/eui48)
+[![docs.rs](https://docs.rs/eui48/badge.svg)](https://docs.rs/eui48)
+{{badges}}
+
+# {{crate}}
+
+{{readme}}
+
+## License
+Licensed under the MIT/Apache-2.0 licenses. Please see the LICENSE-Apache and LICENSE-MIT files for more information.
+
+### Contribution
+Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions.
+
diff --git a/rustc_deps/vendor/eui48/appveyor.yml b/rustc_deps/vendor/eui48/appveyor.yml
new file mode 100644
index 0000000..af3142a
--- /dev/null
+++ b/rustc_deps/vendor/eui48/appveyor.yml
@@ -0,0 +1,121 @@
+# Appveyor configuration template for Rust using rustup for Rust installation
+# https://github.com/starkat99/appveyor-rust
+
+## Operating System (VM environment) ##
+
+# Rust needs at least Visual Studio 2013 Appveyor OS for MSVC targets.
+os: Visual Studio 2015
+
+## Build Matrix ##
+
+# This configuration will setup a build for each channel & target combination (12 windows
+# combinations in all).
+#
+# There are 3 channels: stable, beta, and nightly.
+#
+# Alternatively, the full version may be specified for the channel to build using that specific
+# version (e.g. channel: 1.5.0)
+#
+# The values for target are the set of windows Rust build targets. Each value is of the form
+#
+# ARCH-pc-windows-TOOLCHAIN
+#
+# Where ARCH is the target architecture, either x86_64 or i686, and TOOLCHAIN is the linker
+# toolchain to use, either msvc or gnu. See https://www.rust-lang.org/downloads.html#win-foot for
+# a description of the toolchain differences.
+# See https://github.com/rust-lang-nursery/rustup.rs/#toolchain-specification for description of
+# toolchains and host triples.
+#
+# Comment out channel/target combos you do not wish to build in CI.
+#
+# You may use the `cargoflags` and `RUSTFLAGS` variables to set additional flags for cargo commands
+# and rustc, respectively. For instance, you can uncomment the cargoflags lines in the nightly
+# channels to enable unstable features when building for nightly. Or you could add additional
+# matrix entries to test different combinations of features.
+environment:
+  matrix:
+
+### MSVC Toolchains ###
+
+  # Stable 64-bit MSVC
+    - channel: stable
+      target: x86_64-pc-windows-msvc
+  # Stable 32-bit MSVC
+    - channel: stable
+      target: i686-pc-windows-msvc
+  # Beta 64-bit MSVC
+    - channel: beta
+      target: x86_64-pc-windows-msvc
+  # Beta 32-bit MSVC
+    - channel: beta
+      target: i686-pc-windows-msvc
+  # Nightly 64-bit MSVC
+    - channel: nightly
+      target: x86_64-pc-windows-msvc
+      #cargoflags: --features "unstable"
+  # Nightly 32-bit MSVC
+    - channel: nightly
+      target: i686-pc-windows-msvc
+      #cargoflags: --features "unstable"
+
+### GNU Toolchains ###
+
+  # Stable 64-bit GNU
+    - channel: stable
+      target: x86_64-pc-windows-gnu
+  # Stable 32-bit GNU
+    - channel: stable
+      target: i686-pc-windows-gnu
+  # Beta 64-bit GNU
+    - channel: beta
+      target: x86_64-pc-windows-gnu
+  # Beta 32-bit GNU
+    - channel: beta
+      target: i686-pc-windows-gnu
+  # Nightly 64-bit GNU
+    - channel: nightly
+      target: x86_64-pc-windows-gnu
+      #cargoflags: --features "unstable"
+  # Nightly 32-bit GNU
+    - channel: nightly
+      target: i686-pc-windows-gnu
+      #cargoflags: --features "unstable"
+
+### Allowed failures ###
+
+# See Appveyor documentation for specific details. In short, place any channel or targets you wish
+# to allow build failures on (usually nightly at least is a wise choice). This will prevent a build
+# or test failure in the matching channels/targets from failing the entire build.
+matrix:
+  allow_failures:
+    - channel: nightly
+
+# If you only care about stable channel build failures, uncomment the following line:
+    #- channel: beta
+
+## Install Script ##
+
+# This is the most important part of the Appveyor configuration. This installs the version of Rust
+# specified by the 'channel' and 'target' environment variables from the build matrix. This uses
+# rustup to install Rust.
+#
+# For simple configurations, instead of using the build matrix, you can simply set the
+# default-toolchain and default-host manually here.
+install:
+  - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
+  - rustup-init -yv --default-toolchain %channel% --default-host %target%
+  - set PATH=%PATH%;%USERPROFILE%\.cargo\bin
+  - rustc -vV
+  - cargo -vV
+
+## Build Script ##
+
+# 'cargo test' takes care of building for us, so disable Appveyor's build stage. This prevents
+# the "directory does not contain a project or solution file" error.
+build: false
+
+# Uses 'cargo test' to run tests and build. Alternatively, the project may call compiled programs
+#directly or perform other testing commands. Rust will automatically be placed in the PATH
+# environment variable.
+test_script:
+  - cargo test --verbose %cargoflags%
diff --git a/rustc_deps/vendor/eui48/src/lib.rs b/rustc_deps/vendor/eui48/src/lib.rs
index c6cf846..a9a3ee7 100644
--- a/rustc_deps/vendor/eui48/src/lib.rs
+++ b/rustc_deps/vendor/eui48/src/lib.rs
@@ -20,6 +20,8 @@
 extern crate rustc_serialize;
 #[cfg(feature = "serde")]
 extern crate serde;
+#[cfg(feature = "serde_json")]
+extern crate serde_json;
 
 use std::default::Default;
 use std::error::Error;
@@ -258,6 +260,20 @@
     pub fn as_bytes<'a>(&'a self) -> &'a [u8] {
         &self.eui
     }
+
+    /// Returns an array in Eui48. Works as an inverse function of new()
+    pub fn to_array(&self) -> Eui48 {
+        self.eui
+    }
+
+    /// Returns Display MacAddressFormat, determined at compile time.
+    pub fn get_display_format() -> MacAddressFormat {
+        if cfg!(feature = "disp_hexstring") {
+            MacAddressFormat::HexString
+        } else {
+            MacAddressFormat::Canonical
+        }
+    }
 }
 
 impl FromStr for MacAddress {
@@ -289,7 +305,8 @@
 impl fmt::Display for MacAddress {
     /// Display format is canonical format (00-00-00-00-00-00)
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}", self.to_string(MacAddressFormat::Canonical))
+        let disp_fmt = MacAddress::get_display_format();
+        write!(f, "{}", self.to_string(disp_fmt))
     }
 }
 
@@ -326,7 +343,7 @@
 impl Decodable for MacAddress {
     /// Decode a MacAddress from a string in canonical form
     fn decode<D: Decoder>(d: &mut D) -> Result<MacAddress, D::Error> {
-        let string = try!(d.read_str());
+        let string = d.read_str()?;
         string.parse().map_err(|err| d.error(&format!("{}", err)))
     }
 }
@@ -369,7 +386,7 @@
 // ************** TESTS BEGIN HERE ***************
 #[cfg(test)]
 mod tests {
-    use super::{Eui48, MacAddress, MacAddressFormat};
+    use super::{Eui48, MacAddress, MacAddressFormat, ParseError};
 
     #[test]
     fn test_new() {
@@ -380,17 +397,36 @@
     }
 
     #[test]
+    fn test_from_bytes() {
+        assert_eq!(
+            "12:34:56:ab:cd:ef",
+            MacAddress::from_bytes(&[0x12, 0x34, 0x56, 0xAB, 0xCD, 0xEF])
+                .unwrap()
+                .to_hex_string()
+        );
+        assert!(MacAddress::from_bytes(&[0x12, 0x34, 0x56, 0xAB, 0xCD]).is_err());
+    }
+
+    #[test]
     fn test_nil() {
         let nil = MacAddress::nil();
         let not_nil = MacAddress::broadcast();
+        assert_eq!("00:00:00:00:00:00", nil.to_hex_string());
         assert!(nil.is_nil());
         assert!(!not_nil.is_nil());
     }
 
     #[test]
+    fn test_default() {
+        let default = MacAddress::default();
+        assert!(default.is_nil());
+    }
+
+    #[test]
     fn test_broadcast() {
         let broadcast = MacAddress::broadcast();
         let not_broadcast = MacAddress::nil();
+        assert_eq!("ff:ff:ff:ff:ff:ff", broadcast.to_hex_string());
         assert!(broadcast.is_broadcast());
         assert!(!not_broadcast.is_broadcast());
     }
@@ -398,13 +434,17 @@
     #[test]
     fn test_is_nil() {
         let nil = MacAddress::nil();
+        let not_nil = MacAddress::parse_str("01:00:5E:AB:CD:EF").unwrap();
         assert!(nil.is_nil());
+        assert!(!not_nil.is_nil());
     }
 
     #[test]
     fn test_is_broadcast() {
         let broadcast = MacAddress::broadcast();
+        let not_broadcast = MacAddress::parse_str("01:00:5E:AB:CD:EF").unwrap();
         assert!(broadcast.is_broadcast());
+        assert!(!not_broadcast.is_broadcast());
     }
 
     #[test]
@@ -437,24 +477,26 @@
 
     #[test]
     fn test_is_universal() {
-        let mac = MacAddress::parse_str("11:24:56:AB:CD:EF").unwrap();
-        assert!(mac.is_universal());
-        assert_eq!("11:24:56:ab:cd:ef", mac.to_hex_string()); // Catch modifying first octet
+        let universal = MacAddress::parse_str("11:24:56:AB:CD:EF").unwrap();
+        let not_universal = MacAddress::parse_str("12:24:56:AB:CD:EF").unwrap();
+        assert!(universal.is_universal());
+        assert!(!not_universal.is_universal());
+        assert_eq!("11:24:56:ab:cd:ef", universal.to_hex_string()); // Catch modifying first octet
     }
 
     #[test]
     fn test_is_local() {
-        let mac = MacAddress::parse_str("06:34:56:AB:CD:EF").unwrap();
-        assert!(mac.is_local());
-        assert_eq!("06:34:56:ab:cd:ef", mac.to_hex_string()); // Catch modifying first octet
+        let local = MacAddress::parse_str("06:34:56:AB:CD:EF").unwrap();
+        let not_local = MacAddress::parse_str("00:34:56:AB:CD:EF").unwrap();
+        assert!(local.is_local());
+        assert!(!not_local.is_local());
+        assert_eq!("06:34:56:ab:cd:ef", local.to_hex_string()); // Catch modifying first octet
     }
 
     #[test]
     fn test_to_canonical() {
         let eui: Eui48 = [0x12, 0x34, 0x56, 0xAB, 0xCD, 0xEF];
         let mac = MacAddress::new(eui);
-        let s = format!("{}", mac);
-        assert_eq!(s, mac.to_canonical());
         assert_eq!("12-34-56-ab-cd-ef", mac.to_canonical());
     }
 
@@ -655,4 +697,85 @@
         let m2 = json::decode(&s).unwrap();
         assert_eq!(m1, m2);
     }
+
+    #[test]
+    fn test_fmt_debug() {
+        let mac = MacAddress::parse_str("12:34:56:AB:CD:EF").unwrap();
+        assert_eq!(
+            "MacAddress(\"12:34:56:ab:cd:ef\")".to_owned(),
+            format!("{:?}", mac)
+        );
+    }
+
+    #[test]
+    fn test_fmt() {
+        let mac = MacAddress::parse_str("12:34:56:AB:CD:EF").unwrap();
+        match MacAddress::get_display_format() {
+            MacAddressFormat::HexString => {
+                assert_eq!("12:34:56:ab:cd:ef".to_owned(), format!("{}", mac))
+            }
+            _ => assert_eq!("12-34-56-ab-cd-ef".to_owned(), format!("{}", mac)),
+        };
+    }
+
+    #[test]
+    fn test_fmt_parse_errors() {
+        assert_eq!(
+            "Err(InvalidLength(12))".to_owned(),
+            format!("{:?}", MacAddress::parse_str("123456ABCDEF"))
+        );
+        assert_eq!(
+            "Err(InvalidCharacter(\'#\', 2))".to_owned(),
+            format!("{:?}", MacAddress::parse_str("12#34#56#AB#CD#EF"))
+        );
+    }
+
+    #[test]
+    #[cfg(feature = "serde_json")]
+    fn test_serde_json_serialize() {
+        use serde_json;
+        let serialized =
+            serde_json::to_string(&MacAddress::parse_str("12:34:56:AB:CD:EF").unwrap()).unwrap();
+        assert_eq!("\"12-34-56-ab-cd-ef\"", serialized);
+    }
+
+    #[test]
+    #[cfg(feature = "serde_json")]
+    fn test_serde_json_deserialize() {
+        use serde_json;
+        let mac = MacAddress::parse_str("12:34:56:AB:CD:EF").unwrap();
+        let deserialized: MacAddress = serde_json::from_str("\"12-34-56-AB-CD-EF\"").unwrap();
+        assert_eq!(deserialized, mac);
+    }
+
+    #[test]
+    fn test_macaddressformat_derive() {
+        assert_eq!(MacAddressFormat::HexString, MacAddressFormat::HexString);
+        assert_ne!(MacAddressFormat::HexString, MacAddressFormat::Canonical);
+    }
+
+    #[test]
+    fn test_parseerror_fmt() {
+        use std::error::Error;
+        assert_eq!(
+            "Invalid length; expecting 14 or 17 chars, found 2".to_owned(),
+            format!("{}", ParseError::InvalidLength(2))
+        );
+        assert_eq!(
+            "Invalid character; found `@` at offset 2".to_owned(),
+            format!("{}", ParseError::InvalidCharacter('@', 2))
+        );
+        assert_eq!(
+            "MacAddress parse error".to_owned(),
+            format!("{}", ParseError::InvalidLength(2).description())
+        );
+    }
+
+    #[test]
+    fn test_to_array() {
+        let eui: Eui48 = [0x12, 0x34, 0x56, 0xAB, 0xCD, 0xEF];
+        let mac = MacAddress::new(eui);
+        assert_eq!(eui, MacAddress::new(eui).to_array());
+        assert_eq!(mac, MacAddress::new(mac.to_array()));
+    }
 }