summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cretin <cretin@google.com>2017-11-05 16:04:27 +0100
committerJulien Cretin <cretin@google.com>2017-11-05 16:04:27 +0100
commit2876bd3dd12a71938107472fb6a42ce3c321aa3a (patch)
tree82a2b2e45330877ff3fee31a577d2a74f81575d3
parent69d4634b3ac7a9547112b87a3bb564eda8e63c25 (diff)
Update data-encoding major version
-rw-r--r--Cargo.toml2
-rw-r--r--LICENSE-MIT1
-rw-r--r--src/error.rs4
-rw-r--r--src/ser.rs6
4 files changed, 7 insertions, 6 deletions
diff --git a/Cargo.toml b/Cargo.toml
index d1f9990..718bc76 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,7 +16,7 @@ version = "0.3.0"
repository = "samscott89/serde_qs"
[dependencies]
-data-encoding = "1.2"
+data-encoding = "2.0"
error-chain = "0.11.0"
dtoa = "0.4.0"
fnv = "1.0.3"
diff --git a/LICENSE-MIT b/LICENSE-MIT
index 6e396f3..c8c36a2 100644
--- a/LICENSE-MIT
+++ b/LICENSE-MIT
@@ -1,5 +1,6 @@
Copyright (c) 2016 Anthony Ramine
Copyright (c) 2017 Sam Scott
+Copyright (c) 2017 Google Inc.
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
diff --git a/src/error.rs b/src/error.rs
index c46fc8d..44459c5 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -18,7 +18,7 @@ error_chain! {
}
foreign_links {
- Decoding(data_encoding::decode::Error);
+ Decoding(data_encoding::DecodeError);
FromUtf8(string::FromUtf8Error);
Io(io::Error);
ParseInt(num::ParseIntError);
@@ -46,4 +46,4 @@ impl de::Error for Error {
where T: Display {
ErrorKind::Custom(msg.to_string()).into()
}
-} \ No newline at end of file
+}
diff --git a/src/ser.rs b/src/ser.rs
index bd942fe..2eb9aa0 100644
--- a/src/ser.rs
+++ b/src/ser.rs
@@ -1,7 +1,7 @@
//! Serialization support for querystrings.
-use data_encoding::base64url as base64;
+use data_encoding::BASE64URL_NOPAD as BASE64;
use serde::ser;
use url::form_urlencoded::Serializer as UrlEncodedSerializer;
use url::form_urlencoded::Target as UrlEncodedTarget;
@@ -131,7 +131,7 @@ impl<'a, Target: 'a + UrlEncodedTarget> ser::Serializer for &'a mut QsSerializer
}
fn serialize_bytes(self, value: &[u8]) -> Result<Self::Ok> {
- self.write_value(&base64::encode_nopad(value))
+ self.write_value(&BASE64.encode(value))
}
@@ -436,7 +436,7 @@ impl ser::Serializer for StringSerializer {
fn serialize_bytes(self, value: &[u8]) -> Result<Self::Ok> {
- Ok(base64::encode_nopad(value))
+ Ok(BASE64.encode(value))
}
/// Returns an error.