diff options
| author | bors <bors@rust-lang.org> | 2014-03-29 02:56:40 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-29 02:56:40 -0700 |
| commit | df9cf18c10099d15146580ab6a2b64f2d2007a89 (patch) | |
| tree | 259e7a17e182a4d61d68a6878242689a556bae5e /src/librustdoc/lib.rs | |
| parent | 02d186ad9ba699f7824969fb60a19042613d5d60 (diff) | |
| parent | a9c6061c9a542a617020073d0a6b187849d0e348 (diff) | |
| download | rust-df9cf18c10099d15146580ab6a2b64f2d2007a89.tar.gz rust-df9cf18c10099d15146580ab6a2b64f2d2007a89.zip | |
auto merge of #13188 : FlaPer87/rust/master, r=alexcrichton
Diffstat (limited to 'src/librustdoc/lib.rs')
| -rw-r--r-- | src/librustdoc/lib.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 944cc08f2e3..d16802a2314 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -327,17 +327,6 @@ fn rust_input(cratefile: &str, matches: &getopts::Matches) -> Output { return pm.run_plugins(krate); } -// FIXME: remove unwrap_ after snapshot -#[cfg(stage0)] -fn unwrap_<T>(t: T) -> T { - t -} - -#[cfg(not(stage0))] -fn unwrap_<T, E>(r: Result<T, E>) -> T { - r.unwrap() -} - /// This input format purely deserializes the json output file. No passes are /// run over the deserialized output. fn json_input(input: &str) -> Result<Output, ~str> { @@ -363,7 +352,7 @@ fn json_input(input: &str) -> Result<Output, ~str> { let krate = match obj.pop(&~"crate") { Some(json) => { let mut d = json::Decoder::new(json); - unwrap_(Decodable::decode(&mut d)) + Decodable::decode(&mut d).unwrap() } None => return Err(~"malformed json"), }; @@ -395,7 +384,7 @@ fn json_output(krate: clean::Crate, res: Vec<plugins::PluginJson> , let mut w = MemWriter::new(); { let mut encoder = json::Encoder::new(&mut w as &mut io::Writer); - unwrap_(krate.encode(&mut encoder)); + krate.encode(&mut encoder).unwrap(); } str::from_utf8_owned(w.unwrap()).unwrap() }; |
