diff options
author | Sam Scott <sam.scott89@gmail.com> | 2017-10-31 23:07:39 +0000 |
---|---|---|
committer | Sam Scott <sam.scott89@gmail.com> | 2017-10-31 23:07:39 +0000 |
commit | 8a18724f53ac35095ed603a2fb259f0abdf56daf (patch) | |
tree | afd9b194fea2110c6a3336a136a07d399c0d1af3 /src/error.rs | |
parent | d858a267697da48d56e099eac6860f5ab8e69e46 (diff) |
New parsing strategy.
- Only perform the percent decoding at the final step (fixes #10).
- Reduce allocations by borrowing as much as possible.
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/error.rs b/src/error.rs index e6bfafe..ebffe7f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -4,6 +4,7 @@ use serde::de; use std::fmt::Display; use std::io; use std::num; +use std::str; use std::string; error_chain! { @@ -14,9 +15,10 @@ error_chain! { foreign_links { Decoding(data_encoding::decode::Error); + FromUtf8(string::FromUtf8Error); Io(io::Error); Parse(num::ParseIntError); - Utf8(string::FromUtf8Error); + Utf8(str::Utf8Error); } } |