Port try macro to new ? operator. (#3962)

* initial untry sweep

* restore try in ipc codegen, fix inference

* change a few missed try instances
This commit is contained in:
Robert Habermeier
2016-12-27 12:53:56 +01:00
committed by Arkadiy Paronyan
parent b1ef52a6d7
commit 8125b5690c
165 changed files with 1696 additions and 1696 deletions

View File

@@ -104,9 +104,9 @@ pub struct Success {
}
impl fmt::Display for Success {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
try!(writeln!(f, "Gas used: {:?}", self.gas_used));
try!(writeln!(f, "Output: {:?}", self.output));
try!(writeln!(f, "Time: {}.{:.9}s", self.time.as_secs(), self.time.subsec_nanos()));
writeln!(f, "Gas used: {:?}", self.gas_used)?;
writeln!(f, "Output: {:?}", self.output)?;
writeln!(f, "Time: {}.{:.9}s", self.time.as_secs(), self.time.subsec_nanos())?;
Ok(())
}
}
@@ -120,8 +120,8 @@ pub struct Failure {
}
impl fmt::Display for Failure {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
try!(writeln!(f, "Error: {:?}", self.error));
try!(writeln!(f, "Time: {}.{:.9}s", self.time.as_secs(), self.time.subsec_nanos()));
writeln!(f, "Error: {:?}", self.error)?;
writeln!(f, "Time: {}.{:.9}s", self.time.as_secs(), self.time.subsec_nanos())?;
Ok(())
}
}