Compare commits

...

2 Commits

Author SHA1 Message Date
Homu b5c0406afe Auto merge of #349 - oli-obk:undo, r=oli-obk
undo the breaking change introduced in 0.7.6

I should probably yank 0.7.6, too

cc @alexcrichton this should unbreak your setup, sorry about that.
2016-06-01 20:01:53 +09:00
Oliver Schneider 96cd910c92 undo the breaking change introduced in 0.7.6 2016-06-01 11:08:59 +02:00
6 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "serde"
version = "0.7.6"
version = "0.7.7"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "A generic serialization/deserialization framework"
+1 -1
View File
@@ -578,7 +578,7 @@ pub trait Visitor {
fn visit_char<E>(&mut self, v: char) -> Result<Self::Value, E>
where E: Error,
{
self.visit_str(::core::str::from_utf8(::utils::encode_utf8(v).as_slice()).unwrap())
self.visit_str(::utils::encode_utf8(v).as_str())
}
/// `visit_str` deserializes a `&str` into a `Value`.
+3 -3
View File
@@ -122,11 +122,11 @@ pub trait Serializer {
/// Serializes a `f64` value.
fn serialize_f64(&mut self, v: f64) -> Result<(), Self::Error>;
/// Serializes a character. By default it serializes as bytes containing the UTF-8 encoding
/// of the character.
/// Serializes a character. By default it serializes it as a `&str` containing a
/// single character.
#[inline]
fn serialize_char(&mut self, v: char) -> Result<(), Self::Error> {
self.serialize_bytes(::utils::encode_utf8(v).as_slice())
self.serialize_str(::utils::encode_utf8(v).as_str())
}
/// Serializes a `&str`.
+3 -3
View File
@@ -40,9 +40,9 @@ pub struct EncodeUtf8 {
}
impl EncodeUtf8 {
/// Returns the remaining bytes of this iterator as a slice.
pub fn as_slice(&self) -> &[u8] {
&self.buf[self.pos..]
// FIXME: use this from_utf8_unchecked, since we know it can never fail
pub fn as_str(&self) -> &str {
::core::str::from_utf8(&self.buf[self.pos..]).unwrap()
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "serde_codegen"
version = "0.7.6"
version = "0.7.7"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "Macros to auto-generate implementations for the serde framework"
+3 -3
View File
@@ -1,6 +1,6 @@
[package]
name = "serde_macros"
version = "0.7.6"
version = "0.7.7"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "Macros to auto-generate implementations for the serde framework"
@@ -18,12 +18,12 @@ nightly-testing = ["clippy", "serde/nightly-testing", "serde_codegen/nightly-tes
[dependencies]
clippy = { version = "^0.*", optional = true }
serde_codegen = { version = "^0.7.6", path = "../serde_codegen", default-features = false, features = ["nightly"] }
serde_codegen = { version = "^0.7.7", path = "../serde_codegen", default-features = false, features = ["nightly"] }
[dev-dependencies]
compiletest_rs = "^0.1.1"
rustc-serialize = "^0.3.16"
serde = { version = "^0.7.6", path = "../serde" }
serde = { version = "^0.7.7", path = "../serde" }
[[test]]
name = "test"