Skip to content

Commit

Permalink
docs: deal with Result instead of using unwrap (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcteggart-r7 authored and tobz committed Jan 20, 2019
1 parent 983e9d1 commit 91f20e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/codec/length_delimited.rs
Expand Up @@ -49,11 +49,12 @@
//! use bytes::Bytes;
//! use futures::{Sink, Future};
//!
//! fn write_frame<T: AsyncRead + AsyncWrite>(io: T) {
//! fn write_frame<T: AsyncRead + AsyncWrite>(io: T) -> Result<(), Box<std::error::Error>> {
//! let mut transport = Framed::new(io, LengthDelimitedCodec::new());
//! let frame = Bytes::from("hello world");
//!
//! transport.send(frame).wait().unwrap();
//! transport.send(frame).wait()?;
//! Ok(())
//! }
//! #
//! # pub fn main() {}
Expand Down

0 comments on commit 91f20e3

Please sign in to comment.