From 8a18724f53ac35095ed603a2fb259f0abdf56daf Mon Sep 17 00:00:00 2001 From: Sam Scott Date: Tue, 31 Oct 2017 23:07:39 +0000 Subject: New parsing strategy. - Only perform the percent decoding at the final step (fixes #10). - Reduce allocations by borrowing as much as possible. --- src/error.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/error.rs') 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); } } -- cgit v1.2.3