Converts all try! macros to ? syntax.

Fixes #46
This commit is contained in:
rep-nop
2017-02-25 22:12:33 -05:00
committed by Jakob Stoklund Olesen
parent c8be39fa9d
commit 7459fee71a
22 changed files with 270 additions and 270 deletions

View File

@@ -42,9 +42,9 @@ fn needs_quotes(name: &str) -> bool {
impl fmt::Display for FunctionName {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if needs_quotes(&self.0) {
try!(f.write_char('"'));
f.write_char('"')?;
for c in self.0.chars().flat_map(char::escape_default) {
try!(f.write_char(c));
f.write_char(c)?;
}
f.write_char('"')
} else {