Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion rmp-serde/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased][unreleased]
## [Unreleased][unreleased
## 0.13.2 - 2017-04-30
### Changed
- Fixed `rmps::decode::from_read` signature by marking that it can only deserialize into `DeserializeOwned`. The previous signature let try to deserialize, for example `&str` and other borrow types and it failed at runtime instead of catching it at compile time.

## 0.13.1 - 2017-04-25
### Added
- Add helper `RawRef` struct that allows to deserialize borrowed strings even if they contain invalid UTF-8. This can be when deserializing frames from older MessagePack spec.

## 0.13.0 - 2017-04-24
Expand Down
2 changes: 1 addition & 1 deletion rmp-serde/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rmp-serde"
version = "0.13.1"
version = "0.13.2"
authors = ["Evgeny Safronov <division494@gmail.com>"]
license = "MIT"
description = "Serde bindings for RMP"
Expand Down
6 changes: 3 additions & 3 deletions rmp-serde/src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::str::{self, Utf8Error};
use byteorder::{self, ReadBytesExt};

use serde;
use serde::de::{self, Deserialize, DeserializeSeed, Visitor};
use serde::de::{self, Deserialize, DeserializeOwned, DeserializeSeed, Visitor};

use rmp;
use rmp::Marker;
Expand Down Expand Up @@ -600,9 +600,9 @@ fn test_slice_read() {
/// This conversion can fail if the structure of the Value does not match the structure expected
/// by `T`. It can also fail if the structure is correct but `T`'s implementation of `Deserialize`
/// decides that something is wrong with the data, for example required struct fields are missing.
pub fn from_read<'de, R, T>(rd: R) -> Result<T, Error>
pub fn from_read<R, T>(rd: R) -> Result<T, Error>
where R: io::Read,
T: Deserialize<'de>
T: DeserializeOwned
{
Deserialize::deserialize(&mut Deserializer::new(rd))
}