From 9960d5af2d853613ea8a7d26cf2d000358d09226 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Sat, 28 Jan 2017 17:09:10 +0100 Subject: Update to serde 0.9.0 (fixes #7) --- Cargo.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 95845ca..b9c18f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,9 @@ documentation = "https://docs.rs/serde_urlencoded" description = "`x-www-form-urlencoded` meets Serde" keywords = ["serde", "serialization", "urlencoded"] +[lib] +test = false + [dependencies] -serde = "0.8.7" +serde = "0.9.2" url = "1.0.0" -- cgit v1.2.3 From e140c2b5c5bb5abab7fcc6a9d4540aaa3bf566a6 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Sat, 28 Jan 2017 23:52:52 +0100 Subject: Use void for the unreachable serializers --- Cargo.toml | 1 + src/lib.rs | 1 + src/ser/mod.rs | 36 ++++++------ src/ser/pair.rs | 146 +++++++---------------------------------------- src/ser/part.rs | 174 ++++++++++++-------------------------------------------- src/ser/void.rs | 122 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 198 insertions(+), 282 deletions(-) create mode 100644 src/ser/void.rs (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index b9c18f0..a68819a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,3 +14,4 @@ test = false [dependencies] serde = "0.9.2" url = "1.0.0" +void = "1.0.2" diff --git a/src/lib.rs b/src/lib.rs index bacb67f..0c1a99e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,6 +3,7 @@ #[macro_use] extern crate serde; extern crate url; +extern crate void; pub mod de; pub mod ser; diff --git a/src/ser/mod.rs b/src/ser/mod.rs index 400846f..50355fd 100644 --- a/src/ser/mod.rs +++ b/src/ser/mod.rs @@ -4,12 +4,12 @@ mod key; mod pair; mod part; mod value; +mod void; use serde::ser; use std::borrow::Cow; use std::error; use std::fmt; -use std::marker::PhantomData; use std::str; use url::form_urlencoded::Serializer as UrlEncodedSerializer; use url::form_urlencoded::Target as UrlEncodedTarget; @@ -102,21 +102,21 @@ pub struct SeqSerializer<'output, Target: 'output + UrlEncodedTarget> { /// /// Never instantiated, tuples are not supported at top-level. pub struct TupleSerializer<'output, T: 'output + UrlEncodedTarget> { - _marker: PhantomData<&'output T>, + inner: void::VoidSerializer<&'output mut UrlEncodedSerializer>, } /// Tuple struct serializer. /// /// Never instantiated, tuple structs are not supported. pub struct TupleStructSerializer<'output, T: 'output + UrlEncodedTarget> { - _marker: PhantomData<&'output T>, + inner: void::VoidSerializer<&'output mut UrlEncodedSerializer>, } /// Tuple variant serializer. /// /// Never instantiated, tuple variants are not supported. pub struct TupleVariantSerializer<'output, T: 'output + UrlEncodedTarget> { - _marker: PhantomData<&'output T>, + inner: void::VoidSerializer<&'output mut UrlEncodedSerializer>, } /// Map serializer. @@ -134,7 +134,7 @@ pub struct StructSerializer<'output, Target: 'output + UrlEncodedTarget> { /// /// Never instantiated, struct variants are not supported. pub struct StructVariantSerializer<'output, T: 'output + UrlEncodedTarget> { - _marker: PhantomData<&'output T>, + inner: void::VoidSerializer<&'output mut UrlEncodedSerializer>, } impl<'output, Target> ser::Serializer for Serializer<'output, Target> @@ -368,13 +368,13 @@ impl<'output, Target> ser::SerializeTuple for TupleSerializer<'output, Target> type Error = Error; fn serialize_element(&mut self, - _value: &T) + value: &T) -> Result<(), Error> { - unreachable!() + self.inner.serialize_element(value) } fn end(self) -> Result { - unreachable!() + self.inner.end() } } @@ -386,13 +386,13 @@ impl<'output, Target> ser::SerializeTupleStruct type Error = Error; fn serialize_field(&mut self, - _value: &T) + value: &T) -> Result<(), Error> { - unreachable!() + self.inner.serialize_field(value) } fn end(self) -> Result { - unreachable!() + self.inner.end() } } @@ -404,13 +404,13 @@ impl<'output, Target> ser::SerializeTupleVariant type Error = Error; fn serialize_field(&mut self, - _value: &T) + value: &T) -> Result<(), Error> { - unreachable!() + self.inner.serialize_field(value) } fn end(self) -> Result { - unreachable!() + self.inner.end() } } @@ -488,14 +488,14 @@ impl<'output, Target> ser::SerializeStructVariant type Error = Error; fn serialize_field(&mut self, - _key: &'static str, - _value: &T) + key: &'static str, + value: &T) -> Result<(), Error> { - unreachable!() + self.inner.serialize_field(key, value) } fn end(self) -> Result { - unreachable!() + self.inner.end() } } diff --git a/src/ser/pair.rs b/src/ser/pair.rs index 3d91637..743b3dd 100644 --- a/src/ser/pair.rs +++ b/src/ser/pair.rs @@ -2,6 +2,7 @@ use ser::Error; use ser::key::KeySink; use ser::part::PartSerializer; use ser::value::ValueSink; +use ser::void::VoidSerializer; use serde::ser; use std::borrow::Cow; use std::mem; @@ -29,13 +30,13 @@ impl<'target, Target> ser::Serializer for PairSerializer<'target, Target> { type Ok = (); type Error = Error; - type SerializeSeq = Self; + type SerializeSeq = VoidSerializer<()>; type SerializeTuple = Self; - type SerializeTupleStruct = Self; - type SerializeTupleVariant = Self; - type SerializeMap = Self; - type SerializeStruct = Self; - type SerializeStructVariant = Self; + type SerializeTupleStruct = VoidSerializer<()>; + type SerializeTupleVariant = VoidSerializer<()>; + type SerializeMap = VoidSerializer<()>; + type SerializeStruct = VoidSerializer<()>; + type SerializeStructVariant = VoidSerializer<()>; fn serialize_bool(self, _v: bool) -> Result<(), Error> { Err(Error::unsupported_pair()) @@ -137,11 +138,15 @@ impl<'target, Target> ser::Serializer for PairSerializer<'target, Target> value.serialize(self) } - fn serialize_seq(self, _len: Option) -> Result { + fn serialize_seq(self, + _len: Option) + -> Result, Error> { Err(Error::unsupported_pair()) } - fn serialize_seq_fixed_size(self, _len: usize) -> Result { + fn serialize_seq_fixed_size(self, + _len: usize) + -> Result, Error> { Err(Error::unsupported_pair()) } @@ -156,7 +161,7 @@ impl<'target, Target> ser::Serializer for PairSerializer<'target, Target> fn serialize_tuple_struct(self, _name: &'static str, _len: usize) - -> Result { + -> Result, Error> { Err(Error::unsupported_pair()) } @@ -165,18 +170,20 @@ impl<'target, Target> ser::Serializer for PairSerializer<'target, Target> _variant_index: usize, _variant: &'static str, _len: usize) - -> Result { + -> Result, Error> { Err(Error::unsupported_pair()) } - fn serialize_map(self, _len: Option) -> Result { + fn serialize_map(self, + _len: Option) + -> Result, Error> { Err(Error::unsupported_pair()) } fn serialize_struct(self, _name: &'static str, _len: usize) - -> Result { + -> Result, Error> { Err(Error::unsupported_pair()) } @@ -185,28 +192,11 @@ impl<'target, Target> ser::Serializer for PairSerializer<'target, Target> _variant_index: usize, _variant: &'static str, _len: usize) - -> Result { + -> Result, Error> { Err(Error::unsupported_pair()) } } -impl<'target, Target> ser::SerializeSeq for PairSerializer<'target, Target> - where Target: 'target + UrlEncodedTarget, -{ - type Ok = (); - type Error = Error; - - fn serialize_element(&mut self, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result<(), Error> { - unreachable!() - } -} - impl<'target, Target> ser::SerializeTuple for PairSerializer<'target, Target> where Target: 'target + UrlEncodedTarget, { @@ -251,102 +241,6 @@ impl<'target, Target> ser::SerializeTuple for PairSerializer<'target, Target> } } -impl<'target, Target> ser::SerializeTupleStruct - for PairSerializer<'target, Target> - where Target: 'target + UrlEncodedTarget, -{ - type Ok = (); - type Error = Error; - - fn serialize_field(&mut self, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result<(), Error> { - unreachable!() - } -} - -impl<'target, Target> ser::SerializeTupleVariant - for PairSerializer<'target, Target> - where Target: 'target + UrlEncodedTarget, -{ - type Ok = (); - type Error = Error; - - fn serialize_field(&mut self, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result<(), Error> { - unreachable!() - } -} - -impl<'target, Target> ser::SerializeMap for PairSerializer<'target, Target> - where Target: 'target + UrlEncodedTarget, -{ - type Ok = (); - type Error = Error; - - fn serialize_key(&mut self, - _key: &T) - -> Result<(), Error> { - unreachable!() - } - - fn serialize_value(&mut self, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result<(), Error> { - unreachable!() - } -} - -impl<'target, Target> ser::SerializeStruct for PairSerializer<'target, Target> - where Target: 'target + UrlEncodedTarget, -{ - type Ok = (); - type Error = Error; - - fn serialize_field(&mut self, - _key: &'static str, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result<(), Error> { - unreachable!() - } -} - -impl<'target, Target> ser::SerializeStructVariant - for PairSerializer<'target, Target> - where Target: 'target + UrlEncodedTarget, -{ - type Ok = (); - type Error = Error; - - fn serialize_field(&mut self, - _key: &'static str, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result<(), Error> { - unreachable!() - } -} - enum PairState { WaitingForKey, WaitingForValue { key: Cow<'static, str> }, diff --git a/src/ser/part.rs b/src/ser/part.rs index a865450..097504e 100644 --- a/src/ser/part.rs +++ b/src/ser/part.rs @@ -1,4 +1,5 @@ use ser::Error; +use ser::void::VoidSerializer; use serde::ser; use std::str; @@ -36,13 +37,13 @@ pub trait Sink: Sized { impl ser::Serializer for PartSerializer { type Ok = S::Ok; type Error = Error; - type SerializeSeq = Self; - type SerializeTuple = Self; - type SerializeTupleStruct = Self; - type SerializeTupleVariant = Self; - type SerializeMap = Self; - type SerializeStruct = Self; - type SerializeStructVariant = Self; + type SerializeSeq = VoidSerializer; + type SerializeTuple = VoidSerializer; + type SerializeTupleStruct = VoidSerializer; + type SerializeTupleVariant = VoidSerializer; + type SerializeMap = VoidSerializer; + type SerializeStruct = VoidSerializer; + type SerializeStructVariant = VoidSerializer; fn serialize_bool(self, v: bool) -> Result { self.sink.serialize_bool(v) @@ -147,165 +148,62 @@ impl ser::Serializer for PartSerializer { self.sink.serialize_some(value) } - fn serialize_seq(self, _len: Option) -> Result { + fn serialize_seq(self, + _len: Option) + -> Result { Err(self.sink.unsupported()) } - fn serialize_seq_fixed_size(self, _len: usize) -> Result { + fn serialize_seq_fixed_size(self, + _len: usize) + -> Result { Err(self.sink.unsupported()) } - fn serialize_tuple(self, _len: usize) -> Result { + fn serialize_tuple(self, + _len: usize) + -> Result { Err(self.sink.unsupported()) } fn serialize_tuple_struct(self, _name: &'static str, _len: usize) - -> Result { + -> Result { Err(self.sink.unsupported()) } - fn serialize_tuple_variant(self, - _name: &'static str, - _variant_index: usize, - _variant: &'static str, - _len: usize) - -> Result { + fn serialize_tuple_variant + (self, + _name: &'static str, + _variant_index: usize, + _variant: &'static str, + _len: usize) + -> Result { Err(self.sink.unsupported()) } - fn serialize_map(self, _len: Option) -> Result { + fn serialize_map(self, + _len: Option) + -> Result { Err(self.sink.unsupported()) } fn serialize_struct(self, _name: &'static str, _len: usize) - -> Result { + -> Result { Err(self.sink.unsupported()) } - fn serialize_struct_variant(self, - _name: &'static str, - _variant_index: usize, - _variant: &'static str, - _len: usize) - -> Result { + fn serialize_struct_variant + (self, + _name: &'static str, + _variant_index: usize, + _variant: &'static str, + _len: usize) + -> Result { Err(self.sink.unsupported()) } } - -impl ser::SerializeSeq for PartSerializer { - type Ok = S::Ok; - type Error = Error; - - fn serialize_element(&mut self, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result { - unreachable!() - } -} - -impl ser::SerializeTuple for PartSerializer { - type Ok = S::Ok; - type Error = Error; - - fn serialize_element(&mut self, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result { - unreachable!() - } -} - -impl ser::SerializeTupleStruct for PartSerializer { - type Ok = S::Ok; - type Error = Error; - - fn serialize_field(&mut self, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result { - unreachable!() - } -} - -impl ser::SerializeTupleVariant for PartSerializer { - type Ok = S::Ok; - type Error = Error; - - fn serialize_field(&mut self, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result { - unreachable!() - } -} - -impl ser::SerializeMap for PartSerializer { - type Ok = S::Ok; - type Error = Error; - - fn serialize_key(&mut self, - _key: &T) - -> Result<(), Error> { - unreachable!() - } - - fn serialize_value(&mut self, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result { - unreachable!() - } -} - -impl ser::SerializeStruct for PartSerializer { - type Ok = S::Ok; - type Error = Error; - - fn serialize_field(&mut self, - _key: &'static str, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result { - unreachable!() - } -} - -impl ser::SerializeStructVariant for PartSerializer { - type Ok = S::Ok; - type Error = Error; - - fn serialize_field(&mut self, - _key: &'static str, - _value: &T) - -> Result<(), Error> { - unreachable!() - } - - fn end(self) -> Result { - unreachable!() - } -} diff --git a/src/ser/void.rs b/src/ser/void.rs new file mode 100644 index 0000000..4765bb7 --- /dev/null +++ b/src/ser/void.rs @@ -0,0 +1,122 @@ +use ser::Error; +use serde::ser; +use std::marker::PhantomData; +use void; + +pub struct VoidSerializer { + void: void::Void, + _marker: PhantomData, +} + +impl ser::SerializeSeq for VoidSerializer { + type Ok = Ok; + type Error = Error; + + fn serialize_element(&mut self, + _value: &T) + -> Result<(), Error> { + void::unreachable(self.void) + } + + fn end(self) -> Result { + void::unreachable(self.void) + } +} + +impl ser::SerializeTuple for VoidSerializer { + type Ok = Ok; + type Error = Error; + + fn serialize_element(&mut self, + _value: &T) + -> Result<(), Error> { + void::unreachable(self.void) + } + + fn end(self) -> Result { + void::unreachable(self.void) + } +} + +impl ser::SerializeTupleStruct for VoidSerializer { + type Ok = Ok; + type Error = Error; + + fn serialize_field(&mut self, + _value: &T) + -> Result<(), Error> { + void::unreachable(self.void) + } + + fn end(self) -> Result { + void::unreachable(self.void) + } +} + +impl ser::SerializeTupleVariant for VoidSerializer { + type Ok = Ok; + type Error = Error; + + fn serialize_field(&mut self, + _value: &T) + -> Result<(), Error> { + void::unreachable(self.void) + } + + fn end(self) -> Result { + void::unreachable(self.void) + } +} + +impl ser::SerializeMap for VoidSerializer { + type Ok = Ok; + type Error = Error; + + fn serialize_key(&mut self, + _key: &T) + -> Result<(), Error> { + void::unreachable(self.void) + } + + fn serialize_value(&mut self, + _value: &T) + -> Result<(), Error> { + void::unreachable(self.void) + } + + fn end(self) -> Result { + void::unreachable(self.void) + } +} + +impl ser::SerializeStruct for VoidSerializer { + type Ok = Ok; + type Error = Error; + + fn serialize_field(&mut self, + _key: &'static str, + _value: &T) + -> Result<(), Error> { + void::unreachable(self.void) + } + + fn end(self) -> Result { + void::unreachable(self.void) + } +} + +impl ser::SerializeStructVariant for VoidSerializer { + type Ok = Ok; + type Error = Error; + + fn serialize_field(&mut self, + _key: &'static str, + _value: &T) + -> Result<(), Error> { + void::unreachable(self.void) + } + + fn end(self) -> Result { + void::unreachable(self.void) + } +} -- cgit v1.2.3 From 1d88bbb26b9caaa90993845042e21af444e9399a Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Sat, 28 Jan 2017 23:56:15 +0100 Subject: Use itoa to not allocate a String to serialize an integer --- Cargo.toml | 1 + src/lib.rs | 1 + src/ser/part.rs | 28 ++++++++++++++++++++-------- 3 files changed, 22 insertions(+), 8 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index a68819a..e7865a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ keywords = ["serde", "serialization", "urlencoded"] test = false [dependencies] +itoa = "0.3.0" serde = "0.9.2" url = "1.0.0" void = "1.0.2" diff --git a/src/lib.rs b/src/lib.rs index 0c1a99e..7a3be26 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,6 @@ //! `x-www-form-urlencoded` meets Serde +extern crate itoa; #[macro_use] extern crate serde; extern crate url; diff --git a/src/ser/part.rs b/src/ser/part.rs index 097504e..33811f4 100644 --- a/src/ser/part.rs +++ b/src/ser/part.rs @@ -1,3 +1,4 @@ +use itoa; use ser::Error; use ser::void::VoidSerializer; use serde::ser; @@ -50,35 +51,35 @@ impl ser::Serializer for PartSerializer { } fn serialize_i8(self, v: i8) -> Result { - self.sink.serialize_string(v.to_string()) + self.serialize_integer(v) } fn serialize_i16(self, v: i16) -> Result { - self.sink.serialize_string(v.to_string()) + self.serialize_integer(v) } fn serialize_i32(self, v: i32) -> Result { - self.sink.serialize_string(v.to_string()) + self.serialize_integer(v) } fn serialize_i64(self, v: i64) -> Result { - self.sink.serialize_string(v.to_string()) + self.serialize_integer(v) } fn serialize_u8(self, v: u8) -> Result { - self.sink.serialize_string(v.to_string()) + self.serialize_integer(v) } fn serialize_u16(self, v: u16) -> Result { - self.sink.serialize_string(v.to_string()) + self.serialize_integer(v) } fn serialize_u32(self, v: u32) -> Result { - self.sink.serialize_string(v.to_string()) + self.serialize_integer(v) } fn serialize_u64(self, v: u64) -> Result { - self.sink.serialize_string(v.to_string()) + self.serialize_integer(v) } fn serialize_f32(self, v: f32) -> Result { @@ -207,3 +208,14 @@ impl ser::Serializer for PartSerializer { Err(self.sink.unsupported()) } } + +impl PartSerializer { + fn serialize_integer(self, value: I) -> Result + where I: itoa::Integer + { + let mut buf = [b'\0'; 20]; + let len = itoa::write(&mut buf[..], value).unwrap(); + let part = unsafe { str::from_utf8_unchecked(&buf[0..len]) }; + ser::Serializer::serialize_str(self, part) + } +} -- cgit v1.2.3 From 5625c254e55c767a1ec0235219c232f53dcf9e96 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Sun, 29 Jan 2017 00:14:57 +0100 Subject: Use dtoa to not allocate a String to serialize a float --- Cargo.toml | 1 + src/lib.rs | 1 + src/ser/part.rs | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index e7865a4..8566cc1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ keywords = ["serde", "serialization", "urlencoded"] test = false [dependencies] +dtoa = "0.4.0" itoa = "0.3.0" serde = "0.9.2" url = "1.0.0" diff --git a/src/lib.rs b/src/lib.rs index 7a3be26..8fefd77 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,7 @@ //! `x-www-form-urlencoded` meets Serde extern crate itoa; +extern crate dtoa; #[macro_use] extern crate serde; extern crate url; diff --git a/src/ser/part.rs b/src/ser/part.rs index 33811f4..049bacd 100644 --- a/src/ser/part.rs +++ b/src/ser/part.rs @@ -1,3 +1,4 @@ +use dtoa; use itoa; use ser::Error; use ser::void::VoidSerializer; @@ -83,11 +84,11 @@ impl ser::Serializer for PartSerializer { } fn serialize_f32(self, v: f32) -> Result { - self.sink.serialize_string(v.to_string()) + self.serialize_floating(v) } fn serialize_f64(self, v: f64) -> Result { - self.sink.serialize_string(v.to_string()) + self.serialize_floating(v) } fn serialize_char(self, v: char) -> Result { @@ -218,4 +219,13 @@ impl PartSerializer { let part = unsafe { str::from_utf8_unchecked(&buf[0..len]) }; ser::Serializer::serialize_str(self, part) } + + fn serialize_floating(self, value: F) -> Result + where F: dtoa::Floating + { + let mut buf = [b'\0'; 24]; + let len = dtoa::write(&mut buf[..], value).unwrap(); + let part = unsafe { str::from_utf8_unchecked(&buf[0..len]) }; + ser::Serializer::serialize_str(self, part) + } } -- cgit v1.2.3 From 3e9ebe4fd7428da26dd75e2cc6e5025c847c99e6 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Sat, 28 Jan 2017 17:12:19 +0100 Subject: Bump version to 0.4.0 --- Cargo.toml | 2 +- README.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 8566cc1..87991d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde_urlencoded" -version = "0.3.0" +version = "0.4.0" authors = ["Anthony Ramine "] license = "MIT/Apache-2.0" repository = "https://github.com/nox/serde_urlencoded" diff --git a/README.md b/README.md index 2f0f178..105393b 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ This crate works with Cargo and can be found on ```toml [dependencies] -serde_urlencoded = "0.2.1" +serde_urlencoded = "0.4.0" ``` [crates.io]: https://crates.io/crates/serde_urlencoded @@ -34,7 +34,7 @@ issues](https://github.com/nox/serde_urlencoded/issues/new) as well. ## License -Serde is licensed under either of +serde_urlencoded is licensed under either of * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) @@ -46,5 +46,5 @@ at your option. ### Contribution Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be -dual licensed as above, without any additional terms or conditions. +for inclusion in serde_urlencoded by you, as defined in the Apache-2.0 license, +shall be dual licensed as above, without any additional terms or conditions. -- cgit v1.2.3