diff options
| author | Oliver Schneider <git1984941651981@oli-obk.de> | 2015-03-20 08:19:13 +0100 |
|---|---|---|
| committer | Oliver Schneider <git1984941651981@oli-obk.de> | 2015-03-20 08:19:13 +0100 |
| commit | b4a1e59146c70a12d8c4c1f85c08a2ecf9fb3d2e (patch) | |
| tree | 7b986ee36f81d3566200a9acda28c20b5921e032 /src/libsyntax/ext | |
| parent | 0084f92302b3352372bfd14ebbf083bae695d16e (diff) | |
| download | rust-b4a1e59146c70a12d8c4c1f85c08a2ecf9fb3d2e.tar.gz rust-b4a1e59146c70a12d8c4c1f85c08a2ecf9fb3d2e.zip | |
don't use Result::ok just to be able to use unwrap/unwrap_or
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/deriving/encodable.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/ext/deriving/encodable.rs b/src/libsyntax/ext/deriving/encodable.rs index d7961d7da00..06255f46779 100644 --- a/src/libsyntax/ext/deriving/encodable.rs +++ b/src/libsyntax/ext/deriving/encodable.rs @@ -64,7 +64,7 @@ //! fn encode(&self, s: &mut S) -> Result<(), E> { //! s.emit_struct("Spanned", 2, |this| { //! this.emit_struct_field("node", 0, |this| self.node.encode(this)) -//! .ok().unwrap(); +//! .unwrap(); //! this.emit_struct_field("span", 1, |this| self.span.encode(this)) //! }) //! } @@ -79,9 +79,9 @@ //! d.read_struct("Spanned", 2, |this| { //! Ok(Spanned { //! node: this.read_struct_field("node", 0, |this| Decodable::decode(this)) -//! .ok().unwrap(), +//! .unwrap(), //! span: this.read_struct_field("span", 1, |this| Decodable::decode(this)) -//! .ok().unwrap(), +//! .unwrap(), //! }) //! }) //! } |
