Fix doc tests.

This commit is contained in:
TyOverby 2015-01-16 13:25:55 -08:00
parent aeaa4aafd4
commit 0e044483ee
1 changed files with 3 additions and 1 deletions

View File

@ -28,6 +28,7 @@ mod reader;
///! ### Using Basic Functions ///! ### Using Basic Functions
///! ///!
///! ```rust ///! ```rust
///! #![allow(unstable)]
///! extern crate bincode; ///! extern crate bincode;
///! fn main() { ///! fn main() {
///! // The object that we will serialize. ///! // The object that we will serialize.
@ -44,6 +45,7 @@ mod reader;
///! ### Using Into/From Functions ///! ### Using Into/From Functions
///! ///!
///! ```rust ///! ```rust
///! #![allow(unstable)]
///! extern crate bincode; ///! extern crate bincode;
///! use std::io::pipe::PipeStream; ///! use std::io::pipe::PipeStream;
///! use std::io::BufferedReader; ///! use std::io::BufferedReader;
@ -58,7 +60,7 @@ mod reader;
///! let limit = bincode::SizeLimit::Bounded(10); ///! let limit = bincode::SizeLimit::Bounded(10);
///! ///!
///! // Do the actual encoding and decoding. ///! // Do the actual encoding and decoding.
///! bincode::encode_into(&target, &mut writer, limit); ///! bincode::encode_into(&target, &mut writer, limit).ok();
///! let out: Option<u32> = bincode::decode_from(&mut reader, limit).unwrap(); ///! let out: Option<u32> = bincode::decode_from(&mut reader, limit).unwrap();
///! assert_eq!(target, out); ///! assert_eq!(target, out);
///! } ///! }